Sha256: fdc8208a461806f23060eed372bfc9d2f8cb42400f964fa9e77f5b2342fbdcb2

Contents?: true

Size: 768 Bytes

Versions: 13

Compression:

Stored size: 768 Bytes

Contents

uniform vec3 psColor;
uniform float opacity;

#include common
#include color_pars_fragment
#include map_particle_pars_fragment
#include fog_pars_fragment
#include shadowmap_pars_fragment
#include logdepthbuf_pars_fragment

void main() {
  vec3 outgoingLight = vec3( 0.0 );  // outgoing light does not have an alpha, the surface does
  vec4 diffuseColor = vec4( psColor, opacity );

  #include logdepthbuf_fragment
  #include map_particle_fragment
  #include color_fragment
  #include alphatest_fragment

  outgoingLight = diffuseColor.rgb; // simple shader

  #include shadowmap_fragment
  #include fog_fragment


  fragColor = vec4( outgoingLight, diffuseColor.a );  // TODO, this should be pre-multiplied to allow for bright highlights on very transparent objects
}

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
mittsu-opengl-0.5.1 lib/mittsu/opengl/shader/lib/particle_basic/particle_basic_fragment.rbsl
mittsu-0.4.1 lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_fragment.rbsl
mittsu-opengl-0.5.0 lib/mittsu/opengl/shader/lib/particle_basic/particle_basic_fragment.rbsl
mittsu-0.4.0 lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_fragment.rbsl
mittsu-0.3.3 lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_fragment.rbsl
mittsu-0.3.2 lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_fragment.rbsl
mittsu-0.3.1 lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_fragment.rbsl
mittsu-0.3.0 lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_fragment.rbsl
mittsu-0.2.4 lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_fragment.rbsl
mittsu-0.2.3 lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_fragment.rbsl
mittsu-0.2.2 lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_fragment.rbsl
mittsu-0.2.1 lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_fragment.rbsl
mittsu-0.2.0 lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_fragment.rbsl