fix: ambient occlusion affects hair particle

This commit is contained in:
Turanszki Janos
2021-07-03 18:09:05 +02:00
parent 8867ca4153
commit 4e9cc110d7
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -19,12 +19,24 @@ GBuffer main(VertexToPixel input)
V /= dist;
float emissive = 0;
const uint2 pixel = input.pos.xy;
const float2 ScreenCoord = pixel * g_xFrame_InternalResolution_rcp;
Surface surface;
surface.create(g_xMaterial, color, 0);
surface.P = input.pos3D;
surface.N = input.nor;
surface.V = V;
surface.pixel = input.pos.xy;
#ifndef PREPASS
#ifndef ENVMAPRENDERING
#ifndef TRANSPARENT
surface.occlusion *= texture_ao.SampleLevel(sampler_linear_clamp, ScreenCoord, 0).r;
#endif // TRANSPARENT
#endif // ENVMAPRENDERING
#endif // PREPASS
surface.update();
Lighting lighting;
+1 -1
View File
@@ -9,7 +9,7 @@ namespace wiVersion
// minor features, major updates, breaking compatibility changes
const int minor = 56;
// minor bug fixes, alterations, refactors, updates
const int revision = 58;
const int revision = 59;
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);