-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge from internal dev branch, fix serveral bugs, add rhi layer, deb…
…ug draw...
- Loading branch information
1 parent
3183f4b
commit 2ed2bca
Showing
101 changed files
with
15,076 additions
and
7,758 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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
@echo off | ||
|
||
cmake -S . -B build | ||
cmake --build build --config Release | ||
cmake --build build --config Release | ||
|
||
pause |
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,20 @@ | ||
#version 450 | ||
|
||
#extension GL_GOOGLE_include_directive :enable | ||
layout(location = 0) in vec4 fragColor; | ||
layout(location = 1) in vec2 fragTexCoord; | ||
|
||
layout(location = 0) out vec4 outColor; | ||
|
||
layout(set = 0, binding = 2) uniform sampler2D texSampler; | ||
|
||
|
||
void main(){ | ||
outColor = fragColor; | ||
if(fragTexCoord.x >= 0.0f && fragTexCoord.y >= 0.0f) | ||
{ | ||
vec4 tex = texture(texSampler, fragTexCoord); | ||
float xi = tex.r; | ||
outColor = vec4(fragColor.r*xi,fragColor.g*xi,fragColor.b*xi,fragColor.a*xi); | ||
} | ||
} |
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,43 @@ | ||
#version 450 | ||
|
||
#extension GL_GOOGLE_include_directive :enable | ||
#include "constants.h" | ||
|
||
layout(location = 0) in vec3 inPosition; | ||
layout(location = 1) in vec4 inColor; | ||
layout(location = 2) in vec2 texcoord; | ||
|
||
layout(set = 0, binding = 0) uniform UniformBufferObject { | ||
mat4 proj_view_matrix; | ||
} ubo; | ||
|
||
layout(set = 0, binding = 1) uniform UniformDynamicBufferObject { | ||
mat4 model; | ||
vec4 color; | ||
} dynamic_ubo; | ||
|
||
layout(location = 0) out vec4 fragColor; | ||
layout(location = 1) out vec2 fragTexCoord; | ||
|
||
void main() { | ||
if(texcoord.x<0) | ||
{ | ||
gl_Position = ubo.proj_view_matrix * dynamic_ubo.model * vec4(inPosition,1.0); | ||
} | ||
else | ||
{ | ||
gl_Position = vec4(inPosition,1.0); | ||
} | ||
|
||
gl_PointSize = 2; | ||
|
||
if(dynamic_ubo.color.a>0.000001) | ||
{ | ||
fragColor = dynamic_ubo.color; | ||
} | ||
else | ||
{ | ||
fragColor = inColor; | ||
} | ||
fragTexCoord = texcoord; | ||
} |
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
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
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
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.