Hi,
Is this issue solved in OSG somehow? I need to use some basic lighting on
Android (GLESv3). It should use parameters from osg::Light. Are there any
ready-made solutions?
if not, where can I get some shaders/shader generator to start with? I'm new in
shaders.
Thank you!
Cheers,
Grigoriy
-
Sorry for delayed reply.
My goal is to open and display .osgt files on android the same way they can be
opened on desktop. This includes using several lights inside a model, both
directional and point lights.
I have some progress with writing shaders, but I have troubles with
understanding OSG
After some trial and errors, I managed to do it in shader. But this means one
redundant matrix multiplication per each vertex. Isn't it more effective to
compute it once per frame on cpu side?
What's the purpose of state.getModelViewMatrix()? I expected to get a
camera*model matrix there. Or it
I tried to use osgUtil/ShaderGen. As far as I understand, it does not supports
GLES2/3: it references gl_LightSource, gl_FrontLightProduct etc. in shader
code, and I could not find such uniforms created. Also, it assumes only one
light source.
Maybe there is some more advanced version of ShaderG
At the moment, I implemented ShaderLight class that extends osg::Light and
allows to use several point lights with per-pixel lighting (using my shaders).
It works on android emulator.
I'm not sure about where is a best place to add that lights' uniforms to scene
graph (e.g. rootStateSet->addUni
Hi,
One more question. If I use gl_ModelViewMatrix in shaders to transform Light
position, it gets transformed by both camera matrix and current node's matrix,
that is not right.
Is there some build-in OSG uniform that holds only camera matrix or only model
matrix? Or I should compute it and pa
Thank you, it works.
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75222#75222
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-ope
7 matches
Mail list logo