fix: ambient occlusion affects hair particle
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user