-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix depth in SDSM shadows #2630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,9 +1,10 @@ | ||||||||||
| #import "Common/ShaderLib/GLSLCompat.glsllib" | ||||||||||
| #import "Common/ShaderLib/MultiSample.glsllib" | ||||||||||
| #import "Common/ShaderLib/Shadows.glsllib" | ||||||||||
|
|
||||||||||
| //Stripped version of the usual shadow fragment shader for SDSM; it intentionally leaves out some features. | ||||||||||
| uniform sampler2D m_Texture; | ||||||||||
| uniform sampler2D m_DepthTexture; | ||||||||||
| uniform COLORTEXTURE m_Texture; | ||||||||||
| uniform DEPTHTEXTURE m_DepthTexture; | ||||||||||
| uniform mat4 m_ViewProjectionMatrixInverse; | ||||||||||
| uniform vec4 m_ViewProjectionMatrixRow2; | ||||||||||
|
|
||||||||||
|
|
@@ -43,8 +44,8 @@ float determineShadow(int index, vec4 worldPos){ | |||||||||
| } | ||||||||||
|
|
||||||||||
| void main() { | ||||||||||
| float depth = texture2D(m_DepthTexture,texCoord).r; | ||||||||||
| vec4 color = texture2D(m_Texture,texCoord); | ||||||||||
| float depth = getColor(m_DepthTexture,texCoord).r; | ||||||||||
| vec4 color = getDepth(m_Texture,texCoord); | ||||||||||
|
Comment on lines
+47
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The calls to
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @gemini-code-assist please remember in this project to always submit code suggestions when possible. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are correct. I have provided the code suggestion in the appropriate format.
Suggested change
|
||||||||||
|
|
||||||||||
| //Discard shadow computation on the sky | ||||||||||
| if(depth == 1.0){ | ||||||||||
|
|
||||||||||
Uh oh!
There was an error while loading. Please reload this page.