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

Geometry shader used to verify normals of 3d object #95

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

abhilash1910
Copy link

The folder contains the vertex,geometry and fragment shaders written in GLSL code to determine whether the normals are present in a texture wrapped object and also has attributes for scaling the length of the normals drawn during rendering.
If normals are not present in the wrapped texture then code throws exception and rendering stops.
This can also be used to generate fur-like shader which can be used over the normal uv wrapped objects for better effects.

Vertex shader which is used to verify the proper allocation of normals in the uv wrapped texture of a 3d model.
Contains geometry shaders along with normals to check for the correct disposition of the normals in a texture wrapped object. Contains 3 shaders:
1.vertex shader -initialized the variables ,interface block and passes the necessary arguments after NDC normalization
2.geometry shader- spawns adjacent normal lines in line_strip form alon each of the 3 vertices of a raster triangle.Passes the attributes to pixel shader for coloring.If an object does  not have the normals then it throws error and rendering stops
3. fragment shader-Colorizes the pixels of the normals
The shader code is written in GLSL  and uses  #version 330 core.
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.

1 participant