-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* implament 2d render * add 2d render support properly * fixes: debug window programmer error * update log levels * update shader system * fix logging on windows * load exising shaders from disk * use direct addresing for batched textures Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update src/Renderer/Texture.h Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
- Loading branch information
1 parent
f17764f
commit 85628e1
Showing
40 changed files
with
2,040 additions
and
751 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"enableCMake": true | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"CurrentProjectSetting": "x64-Debug" | ||
"CurrentProjectSetting": "x64-Release" | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#version 330 core | ||
|
||
in vec4 v_Color; | ||
in vec2 v_TexCoord; | ||
in float v_TexIndex; | ||
in float v_TilingFactor; | ||
|
||
uniform sampler2D u_Textures[32]; | ||
|
||
out vec4 FragColor; | ||
|
||
void main() { | ||
vec4 texColor = v_Color; | ||
texColor *= texture(u_Textures[int(v_TexIndex)], v_TexCoord * v_TilingFactor); | ||
FragColor = texColor; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#version 330 core | ||
|
||
layout (location = 0) in vec3 a_Position; | ||
layout (location = 1) in vec4 a_Color; | ||
layout (location = 2) in vec2 a_TexCoord; | ||
layout (location = 3) in float a_TexIndex; | ||
layout (location = 4) in float a_TilingFactor; | ||
|
||
uniform mat4 u_ViewProjection; | ||
|
||
out vec4 v_Color; | ||
out vec2 v_TexCoord; | ||
out float v_TexIndex; | ||
out float v_TilingFactor; | ||
|
||
void main() { | ||
v_Color = a_Color; | ||
v_TexCoord = a_TexCoord; | ||
v_TexIndex = a_TexIndex; | ||
v_TilingFactor = a_TilingFactor; | ||
gl_Position = u_ViewProjection * vec4(a_Position, 1.0); | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.