GLSL data types

General discussion around Urho3D.

GLSL data types

PostPosted by Bananaft » 30 Sep 2016, 12:06

In my inhumane shader experiments I stumbled into weird behavior, when some data types didn't worked as Uniform or Varying. Namely:

Uniform Integer and Varying mat3, no compilation errors, but no result either. First one I fixed by using float, second by using mat4.

Standard shades not using any of this, so I'm not sure if it is a bug, or it's just not implemented as being unnecessary?
User avatar
Bananaft
Active user
Active user
 
Posts: 154
Joined: 26 Nov 2014, 21:53

Re: GLSL data types

PostPosted by cadaver » 30 Sep 2016, 12:13

Varyings should have nothing to do with the engine (just the GLSL compiler and GPU driver).

Int uniforms are not supported in the engine due to historically being difficult to support on Direct3D(9), and to therefore keep feature parity (lowest common denominator). They should be supportable on D3D11 though, so OpenGL support would make sense too.
User avatar
cadaver
Urho3D author
Urho3D author
 
Posts: 1802
Joined: 16 Jan 2014, 14:52
Location: Finland

Re: GLSL data types

PostPosted by cadaver » 30 Sep 2016, 15:55

Ints should now work as uniforms on OpenGL in the master branch (Also definable in the material editor.)
User avatar
cadaver
Urho3D author
Urho3D author
 
Posts: 1802
Joined: 16 Jan 2014, 14:52
Location: Finland

Re: GLSL data types

PostPosted by Bananaft » 01 Oct 2016, 22:37

Whoa, thank you.
User avatar
Bananaft
Active user
Active user
 
Posts: 154
Joined: 26 Nov 2014, 21:53


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron