mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Update
This commit is contained in:
10
druid/materials/gui_world/gui_world.fp
Normal file
10
druid/materials/gui_world/gui_world.fp
Normal file
@@ -0,0 +1,10 @@
|
||||
varying mediump vec2 var_texcoord0;
|
||||
varying lowp vec4 var_color;
|
||||
|
||||
uniform lowp sampler2D texture_sampler;
|
||||
|
||||
void main()
|
||||
{
|
||||
lowp vec4 tex = texture2D(texture_sampler, var_texcoord0.xy);
|
||||
gl_FragColor = tex * var_color;
|
||||
}
|
8
druid/materials/gui_world/gui_world.material
Normal file
8
druid/materials/gui_world/gui_world.material
Normal file
@@ -0,0 +1,8 @@
|
||||
name: "gui_world"
|
||||
tags: "tile"
|
||||
vertex_program: "/druid/materials/gui_world/gui_world.vp"
|
||||
fragment_program: "/druid/materials/gui_world/gui_world.fp"
|
||||
vertex_constants {
|
||||
name: "view_proj"
|
||||
type: CONSTANT_TYPE_VIEWPROJ
|
||||
}
|
16
druid/materials/gui_world/gui_world.vp
Normal file
16
druid/materials/gui_world/gui_world.vp
Normal file
@@ -0,0 +1,16 @@
|
||||
uniform highp mat4 view_proj;
|
||||
|
||||
// positions are in world space
|
||||
attribute highp vec3 position;
|
||||
attribute mediump vec2 texcoord0;
|
||||
attribute lowp vec4 color;
|
||||
|
||||
varying mediump vec2 var_texcoord0;
|
||||
varying lowp vec4 var_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
var_texcoord0 = texcoord0;
|
||||
var_color = vec4(color.rgb * color.a, color.a);
|
||||
gl_Position = view_proj * vec4(position.xyz, 1.0);
|
||||
}
|
Reference in New Issue
Block a user