Hi!
I am working with modern Opengl so that I have to use
setUseVertexAttributeAliasing(true) to get proper normals in shaders.
The problem is that the elements not processed by shaders are not showing their
textures.
I have found something similar in this topic and it seem pretty much the
Thanks for your reply!
Yes, I am using osg_ suffix instead gl_. The only gl_ variable that I am using
is gl_Position, but I think this is OK - correct me if I am wrong.
Actually my shader is very simple. I am just trying to draw the raw normals of
the cow.
The problem with the textures cames
Hi,
I tried to fix it with no success, any suggestion?
Thanks!
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=60770#60770
___
osg-users mailing list
osg-users@lists.openscenegraph.org
The color of the walls could be texture coordinates as you says, it sounds
convincing. But, anyway, I tried adding some normals for testing with following
code but it is still not working:
Code:
osg::Vec3Array *normalArray = new osg::Vec3Array();
normalArray-push_back(osg::Vec3(0.0f,0.0f,
Thanks Nick for the clarification.
In my code I am doing
Code:
osg::StateSet* shaderState = cowG-getOrCreateStateSet();
...
shaderState-setAttributeAndModes(program, osg::StateAttribute::ON);
that seems similar to your suggestion.
The weird thing here is that geometries with no shaders
Why is the attribute aliasing enabled in the first place?
If I am not wrong I have to enable attribute aliasing to use osg_Normals from
shaders.
Have you tried loading a osg model and display it with your shader?
The cow in ScreenShot168.png is rendered with my shader (It is a simple
Looks okay. Still the osg_Normal might default to attribute slot 0, so it
I still don't get what you are trying to achieve.
I want to draw some walls with textures and a model with shaders.
Should I render walls with a shader too?
What do you mean with
Hi all,
I am trying to draw an osg scene (lz.osg) with shaders. For that, I had to use
the Visitor Pattern and so on. The problem that I am having is that I don't
know how the texture coordinates are beeing uploaded to shaders. I was
expecting that I could use osg_MultiTexCoord0 in a similar
Hi,
You are right, I forgot use setUseVertexAttributeAliasing(true)
Thank you very much for the tip!
Best wishes
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=61288#61288
___
osg-users mailing
9 matches
Mail list logo