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

glsl preprocessor directives not parsed #196

Open
3Dickulus opened this issue Mar 26, 2023 · 0 comments
Open

glsl preprocessor directives not parsed #196

3Dickulus opened this issue Mar 26, 2023 · 0 comments

Comments

@3Dickulus
Copy link
Owner

3Dickulus commented Mar 26, 2023

Description
glsl preprocessor directives #if #else #endif are not parsed by FragM
when enclosing sliders on both sides of the conditional both sets of sliders will be created

To Reproduce

// creates 2 Zoom sliders
#if VERSION >= 400
// Camera zoom
uniform double Zoom; slider[1e-4,1,1e64] Logarithmic NotLockable
#else
// Camera zoom
uniform float Zoom; slider[1e-4,1,1e7] Logarithmic NotLockable
#endif

// creates CenterX CenterY Center widgets
#if VERSION >= 400
// Camera center X in high precision (quad-double)
uniform dvec4 CenterX; slider[(-100,-100,-100,-100),(0,0,0,0),(100,100,100,100)] NotLockable
// Camera center Y in high precision (quad-double)
uniform dvec4 CenterY; slider[(-100,-100,-100,-100),(0,0,0,0),(100,100,100,100)] NotLockable
const dvec4 CenterShift = dvec4(1.0, 1.1102230246251565e-16LF, 1.232595164407831e-32LF, 1.3684555315672042e-48LF);
#else
// Camera center in single precision
uniform vec2 Center; slider[(-100,-100),(0,0),(100,100)] NotLockable
vec4 CenterX = vec4(Center.x, 0.0, 0.0, 0.0);
vec4 CenterY = vec4(Center.y, 0.0, 0.0, 0.0);
#endif

Expected behavior
create the correct sliders when VERSION < 400 or VERSION >= 400
1 Zoom slider
Center when < 400 or CenterX and CenterY when >= 400

Desktop:
Vendor: NVIDIA Corporation
Renderer: NVIDIA GeForce GTX 1650 SUPER/PCIe/SSE2
GL Driver: 4.5.0 NVIDIA 525.89.02
Display using GL 4.5 Core profile

Additional context

@3Dickulus 3Dickulus changed the title glsl preprocessor pragmas not parsed glsl preprocessor directives not parsed Mar 26, 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

No branches or pull requests

1 participant