Skip to content

Commit

Permalink
Edit added shader screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
KarthikChandran303 committed Jan 19, 2024
1 parent fb77436 commit 03effbe
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
Binary file added assets/media/SkyBoxGraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion content/project/grass-project/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Rendering grass is a topic that has always intrigued me. In the past, I've exper
First, a compute shader procedurally generates shells along the normal of the base mesh. Each generated vertex contains normal, UV coordinates, position, and height data. (the height data is normalized so that the highest shell has a height of 1 and the lowest shell has a height of 0) This data is then passed to the vertex and fragment shader where we offset the masking textures, discard pixels, and generate color data. A pixel is discarded if the height of its shell exceeds the value sampled in the masking texture. This creates a tapering effect (since higher shells will have more pixels discarded), effectively simulating a grass blade. For my mask, I used a texture generated in Substance Designer.

{{< figure src="grass-height.png" caption="Grass Masking Texture" numbered="true" data-zoomable=true >}}
[![Alternative Text](grass-height.png)](grass-height.png)

The fragment shader is also responsible for displacing the grass wherever the ball moves.

Expand Down
2 changes: 2 additions & 0 deletions content/project/morsel-munchers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ In this project I worked on:
- Creating shaders and materials: custom skybox shader, heat zone shader, peg color switch shader, and paddle shader.
- Integrating art assets into the scene

{{< figure src="SkyBoxGraph.png" caption="Shader Graph for Skybox" numbered="true" data-zoomable=true >}}

0 comments on commit 03effbe

Please sign in to comment.