Geometry shader used to verify normals of 3d object#95
Open
abhilash1910 wants to merge 3 commits intoopengl-tutorials:masterfrom
Open
Geometry shader used to verify normals of 3d object#95abhilash1910 wants to merge 3 commits intoopengl-tutorials:masterfrom
abhilash1910 wants to merge 3 commits intoopengl-tutorials:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.