-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Currently in vizard/ShaderTest.* in GLSL versions:
- https://github.com/OSVR/distortionizer/blob/master/vizard/ShaderTest.frag
- https://github.com/OSVR/distortionizer/blob/master/vizard/ShaderTest.vert
and the Unity ShaderLab/Cg/HLSL version:
which is more widely used but seems to be basically derived from the GLSL ones.
Questions:
- Most pressing: Input: what is the best format to provide the parameters to the shaders, from an OSVR-Core point of view? A struct with matching fields as the uniforms?
- Are these suitable to pull into core in some way or another? (I'm specifically thinking compatibility between OpenGL versions and profiles)
- I don't fully grasp the different centers of projection being used and where they come from - how they are logically derived from the results of the Distortionizer run.
- Performance: Looks like there's an unnecessary
sqrtcall (because the result is immediately squared) in thedistortfunction: see glsl version, unity version - no idea if the shader compilers are smart enough to optimize that out or if it can't be removed for some other reason. That just jumped out at me on a skim - not enough shader experience to tell if the rest of htem is sufficiently optimal.
Metadata
Metadata
Assignees
Labels
No labels