mirror of
https://github.com/Reuh/wirefame.git
synced 2025-10-27 17:49:31 +00:00
Rewrite
This commit is contained in:
parent
b4798c8c16
commit
77cfbaad52
24 changed files with 3033 additions and 1545 deletions
21
shader/pick.lua
Normal file
21
shader/pick.lua
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
return [[
|
||||
|
||||
# ifdef VERTEX
|
||||
uniform mat4 scene_transform; // world -> view transform
|
||||
uniform mat4 model_transform; // model -> world transform
|
||||
|
||||
vec4 position(mat4 love_transform, vec4 vertex_position) {
|
||||
return scene_transform * model_transform * vertex_position;
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef PIXEL
|
||||
uniform vec3 pick_color;
|
||||
|
||||
vec4 effect(vec4 color, sampler2D texture, vec2 texture_coords, vec2 screen_coords) {
|
||||
if (texture2D(texture, texture_coords).a < 0.1) discard;
|
||||
return vec4(pick_color, 1);
|
||||
}
|
||||
# endif
|
||||
|
||||
]]
|
||||
Loading…
Add table
Add a link
Reference in a new issue