diff options
| author | quou <quou@disroot.org> | 2025-01-19 21:04:51 +1100 | 
|---|---|---|
| committer | quou <quou@disroot.org> | 2025-01-19 21:04:51 +1100 | 
| commit | 74e8d3f0278a65fdf86a1185fec8a6016e628e88 (patch) | |
| tree | 660dd28a07296d74e3caf0f6adde0336235be1c0 /intermediate | |
| parent | 7b6bda1188cf80ffc85b16e099d7811c92dbd7ac (diff) | |
render UI in software
Diffstat (limited to 'intermediate')
| -rw-r--r-- | intermediate/ui.glsl | 23 | 
1 files changed, 2 insertions, 21 deletions
| diff --git a/intermediate/ui.glsl b/intermediate/ui.glsl index 095d4df..7dd361d 100644 --- a/intermediate/ui.glsl +++ b/intermediate/ui.glsl @@ -13,28 +13,11 @@ type: vec2  [attribute]  name: uv  type: vec2 -[attribute] -name: colour -type: vec4  [interpolator] -name: colour -type: vec4 -[interpolator]  name: uv  type: vec2 -[struct] -name: Config -[variable] -name: projection -type: mat4 - -[cbuffer] -name: config_buffer -type: Config -stage: vertex -  [texture]  name: atlas  stage: fragment @@ -49,9 +32,8 @@ type: vec4  #ifdef VERTEX_SHADER  void main() { -	interpolator.colour = colour;  	interpolator.uv = uv; -	gl_Position = config_buffer.projection * vec4(position, 0.0, 1.0); +	gl_Position = vec4(position, 1.0, 1.0);  }  #endif @@ -59,8 +41,7 @@ void main() {  #ifdef FRAGMENT_SHADER  void main() { -	vec4 c = texture(atlas, interpolator.uv).r.xxxx; -	c *= interpolator.colour; +	vec4 c = texture(atlas, interpolator.uv).rgba;  	colour = c;  } |