Skip to content
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

Added sampler type in GL pipeline viewer #2951

Closed
wants to merge 2 commits into from
Closed

Conversation

imadr
Copy link

@imadr imadr commented Jun 5, 2023

Description

image

Added a column to the samplers table in the pipeline state viewer for OpenGL.
I put this PR together quickly, I'm not sure if it's the correct way to do it.

@baldurk
Copy link
Owner

baldurk commented Jun 5, 2023

Can you explain what problem you're trying to solve or what information that you're wanting to display that isn't already displayed? Comparison vs not comparison is already displayed so I'm not sure what you are trying to do exactly.

@imadr
Copy link
Author

imadr commented Jun 5, 2023

I'm trying to see the sampler type in the samplers list

Correct me if I'm wrong, but in OpenGL the compare func doesn't always correspond to the sampler type? Contrary to d3d where you can use any compare func https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-to-samplecmp

OpenGL sampler types https://www.khronos.org/opengl/wiki/Sampler_(GLSL)#Sampler_types
OpenGL comparison mode https://www.khronos.org/opengl/wiki/Sampler_Object#Comparison_mode

@baldurk
Copy link
Owner

baldurk commented Jun 5, 2023

A 'shadow' sampler as GL will call it is 1:1 with comparison mode being enabled - if comparison mode is enabled, you must use a shadow sampler, and vice-versa for a non-shadow sampler you cannot use comparison mode. This is outlined in the second link you posted:

Using this mode requires two special settings. First, the sampler used in GLSL must be a shadow sampler. Second, the texture used in that sampler must have activated depth comparison mode. Attempting to use a texture without comparison with a shadow sampler, or vice-versa, will result in an error upon rendering.

In your screenshot the comparison mode is shown in the filter: (Less Equal). The type column then seems redundant because it's showing the same information, unless I'm misunderstanding what you mean.

@imadr
Copy link
Author

imadr commented Jun 5, 2023

A 'shadow' sampler as GL will call it is 1:1 with comparison mode being enabled

Fair enough, I wasn't aware of that

@imadr imadr closed this Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants