Implement shaders (#1)

Reviewed-on: #1

	* Start implementing shaders and move vector code to dedicated files
	* Extract shader into its own header
	* Ensure pixel coordinates are within bounds
	* Refactor shader code and implement fragment shaders
	* Create shaders
	* Reorganise code
Co-authored-by: Abdelrahman <said.abdelrahman89@gmail.com>
Co-committed-by: Abdelrahman <said.abdelrahman89@gmail.com>
This commit is contained in:
2024-08-18 14:28:09 +00:00
committed by Abdelrahman Said
parent 3bbab3f624
commit 50b8c6dd0a
19 changed files with 804 additions and 567 deletions

View File

@@ -3,9 +3,11 @@
CC=clang
WAPP_INCLUDE="$(find intern/wapp/src -type d | xargs -I{} echo -n "-I{} ")"
WAPP_SRC="$(find intern/wapp/src -type f -name "*.c" | xargs -I{} echo -n "{} ")"
CFLAGS="-g -Isrc $WAPP_INCLUDE"
TINYRENDER_INCLUDE="$(find src -type d | xargs -I{} echo -n "-I{} ")"
TINYRENDER_SRC="$(find src -type f -name "*.c" | xargs -I{} echo -n "{} ")"
CFLAGS="-g $TINYRENDER_INCLUDE $WAPP_INCLUDE"
LIBS="-lm"
SRC="src/*.c $WAPP_SRC"
SRC="$TINYRENDER_SRC $WAPP_SRC"
OUT=tiny
(set -x ; $CC $CFLAGS $LIBS $SRC -o $OUT)