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

Shader language custom features #75

Open
mouse0w0 opened this issue Dec 6, 2019 · 3 comments
Open

Shader language custom features #75

mouse0w0 opened this issue Dec 6, 2019 · 3 comments
Labels
type: feature New feature or request

Comments

@mouse0w0
Copy link
Member

mouse0w0 commented Dec 6, 2019

A Shader Language preprocessor processes the shader code to add some custom features.

'#include''#import' statement

Include statement to include the code of another shader file into the code of current shader file. For example:

#import "library/another.shader"

Collecting shader information

Collecting the shader source code information into the data structure. Including but not limited to uniforms, vertex attributes, ins, outs, consts, functions.

@mouse0w0 mouse0w0 changed the title Shader language features Shader language custom features Dec 6, 2019
@cvrunmin
Copy link
Contributor

cvrunmin commented Dec 7, 2019

#include can only be supported if the graphics card has this extension supported: GL_ARB_shading_language_include
If we have to support this on any cards, we do need some tricks to simulate it

@mouse0w0
Copy link
Member Author

mouse0w0 commented Dec 7, 2019

#include can only be supported if the graphics card has this extension supported: GL_ARB_shading_language_include

No, I want to preprocess this statement before compiling shader code.

@mouse0w0 mouse0w0 added the type: feature New feature or request label Dec 7, 2019
@cvrunmin
Copy link
Contributor

cvrunmin commented Jan 7, 2020

decided to refer https://github.com/KhronosGroup/glslang for 'collecting shader information' to help us build the parser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants