Skip to content

Commit

Permalink
volumetric: cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
vlj committed Mar 3, 2024
1 parent 875250d commit 649c022
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions data/base/shaders/pointlights.frag
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#define WZ_MAX_POINT_LIGHTS 0
#define WZ_MAX_INDEXED_POINT_LIGHTS 0
#define WZ_BUCKET_DIMENSION 0
#define WZ_VOLUMETRIC_LIGHTING_ENABLED 1
#define WZ_VOLUMETRIC_LIGHTING_ENABLED 0

uniform vec4 PointLightsPosition[WZ_MAX_POINT_LIGHTS];
uniform vec4 PointLightsColorAndEnergy[WZ_MAX_POINT_LIGHTS];
Expand Down Expand Up @@ -148,7 +148,7 @@ vec4 volumetricLights(
vec3 transMittance = vec3(1);


#define STEPS 64
#define STEPS (WZ_VOLUMETRIC_LIGHTING_ENABLED * 16)
for (int i = 0; i < STEPS; i++)
{

Expand Down
2 changes: 1 addition & 1 deletion data/base/shaders/tcmask_instanced.frag
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ void main()
fragColour.a = 0.66 + 0.66 * graphicsCycle;
}

if (WZ_VOLUMETRIC_LIGHTING_ENABLED == 1) {
if (WZ_VOLUMETRIC_LIGHTING_ENABLED != 0) {
vec2 clipSpaceCoord = gl_FragCoord.xy / vec2(viewportWidth, viewportHeight);
vec4 volumetric = volumetricLights(clipSpaceCoord, cameraPos.xyz, fragPos, diffuse.xyz);
fragColour.xyz = toneMap(fragColour.xyz * volumetric.a + volumetric.xyz);
Expand Down
2 changes: 1 addition & 1 deletion data/base/shaders/terrain_combined_high.frag
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ void main()
{
vec4 fragColor = main_bumpMapping();

if (WZ_VOLUMETRIC_LIGHTING_ENABLED == 1) {
if (WZ_VOLUMETRIC_LIGHTING_ENABLED != 1) {
vec2 clipSpaceCoord = gl_FragCoord.xy / vec2(viewportWidth, viewportHeight);
vec4 volumetric = volumetricLights(clipSpaceCoord, cameraPos.xyz, fragPos, diffuseLight.xyz);
fragColor.xyz = toneMap(fragColor.xyz * volumetric.a + volumetric.xyz);
Expand Down
2 changes: 1 addition & 1 deletion data/base/shaders/vk/terrain_combined_high.frag
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void main()
{
vec4 fragColor = main_bumpMapping();

if (WZ_VOLUMETRIC_LIGHTING_ENABLED == 1) {
if (WZ_VOLUMETRIC_LIGHTING_ENABLED != 1) {
vec2 clipSpaceCoord = gl_FragCoord.xy / vec2(viewportWidth, viewportHeight);
vec4 volumetric = volumetricLights(clipSpaceCoord, cameraPos.xyz, frag.fragPos, diffuseLight.xyz);
fragColor.xyz = toneMap(fragColor.xyz * volumetric.a + volumetric.xyz);
Expand Down

0 comments on commit 649c022

Please sign in to comment.