forked from LaG1924/AltCraft
-
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.
- Loading branch information
Showing
7 changed files
with
36 additions
and
30 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 |
---|---|---|
|
@@ -3,8 +3,7 @@ | |
"frag": "/altcraft/shaders/frag/entity", | ||
"uniforms": [ | ||
"color", | ||
"view", | ||
"projection", | ||
"projView", | ||
"model" | ||
] | ||
} | ||
} |
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 |
---|---|---|
@@ -1,13 +1,16 @@ | ||
#version 330 core | ||
|
||
uniform mat4 view; | ||
uniform mat4 projection; | ||
uniform mat4 model; | ||
uniform mat4 projView; | ||
uniform mat4 model; | ||
layout (location = 0) in vec3 position; | ||
layout (location = 1) in vec2 uvPosition; | ||
out vec2 uvPos; | ||
|
||
//Intel SNB | ||
//VS vec4 shader: 23 instructions. 0 loops. 176 cycles. 0:0 spills:fills, 1 sends. Compacted 368 to 320 bytes (13%) | ||
//Opt: VS vec4 shader: 16 instructions. 0 loops. 116 cycles. 0:0 spills:fills, 1 sends. Compacted 256 to 224 bytes (12%) | ||
|
||
void main(){ | ||
uvPos = uvPosition; | ||
gl_Position = projection*view*model*vec4(position,1); | ||
} | ||
gl_Position = projView*model*vec4(position,1); | ||
} |
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 |
---|---|---|
@@ -1,17 +1,20 @@ | ||
#version 330 core | ||
|
||
uniform mat4 view; | ||
uniform mat4 projection; | ||
uniform mat4 model; | ||
uniform mat4 projView; | ||
uniform mat4 model; | ||
|
||
layout (location = 0) in vec3 position; | ||
layout (location = 1) in vec2 uvPosition; | ||
|
||
out vec2 uvPos; | ||
out vec3 pos; | ||
|
||
//Intel SNB | ||
//VS vec4 shader: 24 instructions. 0 loops. 178 cycles. 0:0 spills:fills, 1 sends. Compacted 384 to 336 bytes (12%) | ||
//Opt: VS vec4 shader: 17 instructions. 0 loops. 116 cycles. 0:0 spills:fills, 1 sends. Compacted 272 to 240 bytes (12%) | ||
|
||
void main(){ | ||
uvPos = uvPosition; | ||
pos = position; | ||
gl_Position = projection*view*model*vec4(position,1); | ||
} | ||
gl_Position = projView*model*vec4(position,1); | ||
} |
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