Move resources to bin
This commit is contained in:
1
bin/resources/Spaceship/readme.txt
Normal file
1
bin/resources/Spaceship/readme.txt
Normal file
@@ -0,0 +1 @@
|
||||
http://thefree3dmodels.com/stuff/aircraft/spaceship/15-1-0-1415
|
||||
3
bin/resources/shaders/spirv-triangle.bat
Normal file
3
bin/resources/shaders/spirv-triangle.bat
Normal file
@@ -0,0 +1,3 @@
|
||||
glslangvalidator -V triangle.vert -o triangle.vert.spv --client opengl100
|
||||
glslangvalidator -V triangle.frag -o triangle.frag.spv --client opengl100
|
||||
|
||||
20
bin/resources/shaders/triangle.frag
Normal file
20
bin/resources/shaders/triangle.frag
Normal file
@@ -0,0 +1,20 @@
|
||||
#version 450
|
||||
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_420pack : enable
|
||||
|
||||
layout(binding = 1) uniform sampler2D texSampler;
|
||||
|
||||
layout (location = 0) in vec3 inNormal;
|
||||
layout (location = 1) in vec2 inUV;
|
||||
|
||||
layout (location = 0) out vec4 outFragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 lightDir = vec3(0.0, -0.707, 0.707);
|
||||
float lightFactor = dot(inNormal, lightDir);
|
||||
|
||||
float gamma = 2.2;
|
||||
outFragColor = lightFactor * vec4(pow(texture(texSampler, inUV).xyz, vec3(1.0/gamma)), 1.0);
|
||||
}
|
||||
BIN
bin/resources/shaders/triangle.frag.spv
Normal file
BIN
bin/resources/shaders/triangle.frag.spv
Normal file
Binary file not shown.
32
bin/resources/shaders/triangle.vert
Normal file
32
bin/resources/shaders/triangle.vert
Normal file
@@ -0,0 +1,32 @@
|
||||
#version 450
|
||||
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_420pack : enable
|
||||
|
||||
layout (location = 0) in vec3 inPos;
|
||||
layout (location = 1) in vec3 inNormals;
|
||||
layout (location = 2) in vec2 inTexCoord;
|
||||
|
||||
layout (binding = 0) uniform UBO
|
||||
{
|
||||
mat4 projectionMatrix;
|
||||
mat4 modelMatrix;
|
||||
mat4 viewMatrix;
|
||||
} ubo;
|
||||
|
||||
layout (location = 0) out vec3 outNormal;
|
||||
layout (location = 1) out vec2 outTexCoords;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
outNormal = inNormals;
|
||||
outTexCoords = inTexCoord;
|
||||
gl_Position = ubo.projectionMatrix * ubo.viewMatrix * ubo.modelMatrix * vec4(inPos, 1.0);
|
||||
gl_Position.y = -gl_Position.y;
|
||||
}
|
||||
BIN
bin/resources/shaders/triangle.vert.spv
Normal file
BIN
bin/resources/shaders/triangle.vert.spv
Normal file
Binary file not shown.
Reference in New Issue
Block a user