Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

basic shader questions

$
0
0

Hi

as a shader newbie, I want to use a existing shader but don't understand to begin those:

// textures

uniform sampler2D u_textureFg;

uniform sampler2D u_textureBg;

// alpha-blends two colors

vec4 blend(vec4 bg,vec4 fg){

How should I give a loaded texture to for ex:

uniform sampler2D u_textureBg;

Why is it later only named bg and not u_textureBg?

Many thanks

 


Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>