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

Wang Ruipeng hw00 #8

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- master
- gh-pages
jobs:
build-and-deploy:
runs-on: ubuntu-latest
Expand Down
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/src/main.ts",
"preLaunchTask": "tsc: build - tsconfig.json",
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
]
}
]
}
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,32 @@
</p>
<p align="center">(source: Ken Perlin)</p>

## Project Description
This project implements a dynamic procedural noise shader using WebGL and GLSL. The project allows you to manipulate several input such as noise scales, base colors, ambient lighting, through GUI, providing instant feedback.
<img width="1470" alt="Demo" src="https://github.com/user-attachments/assets/37161b6d-9c7d-49c6-8f7a-d174d1df0229">

## Features
1. **Procedural Noise Fragment Shader**:
- Implemented a custom fragment shader using **FBM (Fractal Brownian Motion)** noise based on 3D inputs, which allows for the simulation of textures like lava, clouds, or abstract organic patterns.
2. **Vertex Shader with Trigonometric Modification**:
- The vertex positions of the objects are modified over time using a sine function, which causes the objects to oscillate dynamically.
3. **Interactive Controls via `dat.GUI`**:
- **Color Control**: Modify the base color of the shader dynamically.
- **Noise Scale**: Control the scale of the noise across the X, Y, and Z axes for precise manipulation of the noise effect.
- **Ambient Light Control**: Adjust the ambient lighting term to make the cube more or less illuminated.
- **Base Color Control**: Change the base color used in the noise function, allowing for dramatic color changes in the rendered object.
4. **Real-Time Interaction**:
- The project allows for real-time interaction with the shader through the provided GUI, offering immediate visual feedback as parameters are adjusted.

## Live Demo
You can view a live demo of this project here: https://wang-ruipeng.github.io/CIS566-24fall-hw0/

## Output

https://github.com/user-attachments/assets/06a510a0-199c-45e0-9541-e839f17e23af

## Following part of the REAMDME is the original instruction to this assignment.

## Objective
- Check that the tools and build configuration we will be using for the class works.
- Start learning Typescript and WebGL2
Expand Down
36 changes: 36 additions & 0 deletions dist/src/Camera.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/src/Camera.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

97 changes: 97 additions & 0 deletions dist/src/geometry/Cube.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/src/geometry/Cube.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading