feature/imgui-sdl
points-test
Last change
on this file since 3effd81 was 9f9f9a7, checked in by Dmitry Portnoy <dmp1488@…>, 7 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
|
Rev | Line | |
---|
[b155f13] | 1 | #version 410
|
---|
| 2 |
|
---|
[9f9f9a7] | 3 | uniform sampler2D basic_texture;
|
---|
| 4 | uniform vec3 laser_color;
|
---|
| 5 |
|
---|
| 6 | in vec2 texture_coordinates;
|
---|
| 7 | in vec3 position_eye;
|
---|
[b155f13] | 8 |
|
---|
| 9 | out vec4 frag_color;
|
---|
| 10 |
|
---|
| 11 | void main() {
|
---|
[9f9f9a7] | 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);
|
---|
[b155f13] | 15 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.