feature/imgui-sdl
points-test
Last change
on this file since 9f9f9a7 was 9f9f9a7, checked in by Dmitry Portnoy <dmp1488@…>, 6 years ago |
Improve the laser rendering algorithm by using a translucent white texture that gets blended with am arbitrary color.
|
-
Property mode
set to
100644
|
File size:
329 bytes
|
Line | |
---|
1 | #version 410
|
---|
2 |
|
---|
3 | uniform sampler2D basic_texture;
|
---|
4 | uniform vec3 laser_color;
|
---|
5 |
|
---|
6 | in vec2 texture_coordinates;
|
---|
7 | in vec3 position_eye;
|
---|
8 |
|
---|
9 | out vec4 frag_color;
|
---|
10 |
|
---|
11 | void main() {
|
---|
12 | vec4 texel = texture(basic_texture, texture_coordinates);
|
---|
13 |
|
---|
14 | frag_color = vec4(texel.r * laser_color.r, texel.g * laser_color.g, texel.b * laser_color.b, texel.a);
|
---|
15 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.