Skip to content

Commit

Permalink
fixed water drops a bit; added clipping call to default pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
aap committed May 10, 2019
1 parent 8034caa commit 9700158
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ patch(void)
if(isVC())
InjectHook(AddressByVersion<addr>(0, 0, 0, 0x55EA39, 0x55EA59, 0x55E929), sniperTrailsHook, PATCH_JUMP);

config.neowaterdrops = readint(cfg.get("SkyGfx", "neoWaterDrops", ""));
config.neowaterdrops = readint(cfg.get("SkyGfx", "neoWaterDrops", ""), -1);
if(config.neowaterdrops >= 0)
hookWaterDrops();

Expand Down
8 changes: 8 additions & 0 deletions src/matfx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,14 @@ _rpMatFXD3D8AtomicMatFXEnvRender_ps2_shader(RxD3D8InstanceData *inst, int flags,
// Env pass
MatFX *matfx = *RWPLUGINOFFSET(MatFX*, inst->material, MatFXMaterialDataOffset);
MatFXEnv *env = &matfx->fx[sel].e;
#ifdef DEBUG
env->envCoeff *= envmult;
// simulate broken filtering
if(ps2filtering)
envMap->filterAddressing = texture == nil ? 0x1101 : texture->filterAddressing;
else
envMap->filterAddressing = 0x1102;
#endif
ApplyEnvMapTextureMatrix_world(envMap, 0, env->envFrame);
void *lightingShader = config.ps2light ? ps2StandardEnvOnlyVS : pcStandardEnvOnlyVS;
RwD3D9SetVertexShader(flags&rpGEOMETRYLIGHT ? lightingShader : nolightEnvOnlyVS);
Expand Down
4 changes: 2 additions & 2 deletions src/neoWaterdrops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ getParticleDistance(int id)
case III_PARTICLE_RAIN_SPLASHUP: return 5.0f;
case III_PARTICLE_WATERSPRAY: return 20.0f;
case III_PARTICLE_CAR_SPLASH: return 5.0f;
case III_PARTICLE_BOAT_SPLASH: return 30.0f;
case III_PARTICLE_BOAT_SPLASH: return 40.0f;
case III_PARTICLE_BOAT_THRUSTJET: return 20.0f;
case III_PARTICLE_BOAT_WAKE: return 20.0f;
case III_PARTICLE_WATER_HYDRANT: return 10.0f;
Expand All @@ -324,7 +324,7 @@ getParticleDistance(int id)
case VC_PARTICLE_WATERDROP: return 20.0f;
case VC_PARTICLE_BLOODDROP: return 5.0f;
case VC_PARTICLE_CAR_SPLASH: return 12.0f;
case VC_PARTICLE_BOAT_SPLASH: return 30.0f;
case VC_PARTICLE_BOAT_SPLASH: return 40.0f;
case VC_PARTICLE_BOAT_THRUSTJET: return 20.0f;
case VC_PARTICLE_WATER_HYDRANT: return 10.0f;
case VC_PARTICLE_WATER_CANNON: return 20.0f;
Expand Down
2 changes: 2 additions & 0 deletions src/rwfix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,8 @@ rxD3D8SetAmbientLight(void)
void
rxD3D8DefaultRenderCallback_xbox(RwResEntry *repEntry, void *object, RwUInt8 type, RwUInt32 flags)
{
_rwD3D8EnableClippingIfNeeded(object, type);

rxD3D8SetAmbientLight();

RxD3D8ResEntryHeader *header = (RxD3D8ResEntryHeader*)&repEntry[1];
Expand Down

0 comments on commit 9700158

Please sign in to comment.