|
Last change
on this file since 12091 was
12091,
checked in by wiesep, 7 years ago
|
|
Updated programs and adjusted Material to work with GLSL>150
|
|
File size:
635 bytes
|
| Line | |
|---|
| 1 | #version 100 |
|---|
| 2 | precision mediump int; |
|---|
| 3 | precision mediump float; |
|---|
| 4 | |
|---|
| 5 | //------------------------------- |
|---|
| 6 | // Bloom_ps20.glsles |
|---|
| 7 | // Blends using weights the blurred image with the sharp one |
|---|
| 8 | // Params: |
|---|
| 9 | // OriginalImageWeight |
|---|
| 10 | // BlurWeight |
|---|
| 11 | //------------------------------- |
|---|
| 12 | |
|---|
| 13 | uniform sampler2D RT; |
|---|
| 14 | uniform sampler2D Blur1; |
|---|
| 15 | |
|---|
| 16 | uniform float OriginalImageWeight; |
|---|
| 17 | uniform float BlurWeight; |
|---|
| 18 | varying vec2 texCoord; |
|---|
| 19 | |
|---|
| 20 | void main() |
|---|
| 21 | { |
|---|
| 22 | vec4 sharp; |
|---|
| 23 | vec4 blur; |
|---|
| 24 | |
|---|
| 25 | sharp = texture2D( RT, texCoord); |
|---|
| 26 | blur = texture2D( Blur1, texCoord); |
|---|
| 27 | |
|---|
| 28 | gl_FragColor = ( (blur * BlurWeight) + (sharp * OriginalImageWeight) ); |
|---|
| 29 | //gl_FragColor = vec4(0); |
|---|
| 30 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.