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

Support for clip/cull planes in ES: EXT_clip_cull_distance #566

Open
pknowlesnv opened this issue Oct 24, 2016 · 3 comments
Open

Support for clip/cull planes in ES: EXT_clip_cull_distance #566

pknowlesnv opened this issue Oct 24, 2016 · 3 comments
Assignees

Comments

@pknowlesnv
Copy link

EXT_clip_cull_distance exposts ARB_cull_distance to GL ES.
https://www.khronos.org/registry/gles/extensions/EXT/EXT_clip_cull_distance.txt

It looks like the version/profile requirements in Initialize.cpp will need updating to include ES for the following:
gl_ClipDistance
gl_CullDistance
gl_MaxClipDistances
gl_MaxCullDistances
gl_MaxCombinedClipAndCullDistances

Also just to double check, the version number requirements for cull distance are 450, but only OpenGL 3.0 is required. Is this because a #extension directive is needed to enable them before #version 450?

@johnkslang
Copy link
Member

Yes, if this extension gets implemented, it would change what versions trigger these variables.

In glslang, I only see gl_CullDistance[] added as a built-in variable when version >= 450, which seems correct.

@strandborg
Copy link

We at Unity would like to see this get implemented soon, as AFAIK the only way to get glslang to produce RelaxedPrecision stuff is to use ES profile, but that in turn will disable all user clip planes. Having this be controlled by an extension would also be a good way to control whether the SPIR-V shader output requires the ClipDistance capability.

@johnkslang
Copy link
Member

the only way to get glslang to produce RelaxedPrecision stuff is to use ES profile

This actually is not true. When generating SPIR-V, GLSL mediump and lowp translate to SPIR-V RelaxedPrecision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants