Skip to content

Commit

Permalink
Fixed OpenGL compatibility (and hopefully fixed the purple rock bug)
Browse files Browse the repository at this point in the history
  • Loading branch information
Helliaca committed Dec 17, 2022
1 parent ddf1e7a commit 4b14c38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gfx/FX/pdxmap.shader
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ PixelShader =
// Papermap color
float3 papermap = 0.8f * float3(0.66, 0.435, 0.196) * TerrainColor.a *
lerp(
1.0f,
float3(1.0f, 1.0f, 1.0f),
min(TerrainColor.rgb*10.0f, 1.0f),
0.63f // This value effectively controls the saturation
)
Expand Down
4 changes: 2 additions & 2 deletions gfx/FX/pdxmesh.shader
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ PixelShader =
float lava = 0.0f;
if(vDiffuse.r>=1.0f && vDiffuse.g<=0.0f && vDiffuse.b>=1.0f) {
lava = 1.0f;
lava_emit = tex2D( DiffuseMap, float2(vUV0.x, 1.0f-vUV0.y) );
lava_emit = tex2D( DiffuseMap, float2(vUV0.x, 1.0f-vUV0.y) ).rgb;
vDiffuse = float4(1.0f, 1.0f, 1.0f, 1.0f);
}

Expand Down Expand Up @@ -572,7 +572,7 @@ PixelShader =
// This controls the "glowiness" of the lava
lava_emit.rg *= 3.5f;
// 0.05 controls the amount of black slag on top of the lava, while 1.2 controls how red it is.
vColor = smoothstep(vColor, 0, 0.05) * pow(lava_emit, 1.2);
vColor = smoothstep(0, vColor.r, 0.05f) * pow(lava_emit, float3(1.2f, 1.2f, 1.2f));
}

float FogColorFactor = 0.0;
Expand Down

0 comments on commit 4b14c38

Please sign in to comment.