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://alphapixel.com/faqs/
src\osgUtil\SceneView.cpp(422): osg::Uniform* uniform =
_localStateSet->getOrCreateUniform(“osg_ViewMatrix”,osg::Uniform::FLOAT_MAT4);
src\osgUtil\SceneView.cpp(428): osg::Uniform* uniform =
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
Let me check with Thomas.
On Mon, Nov 19, 2018 at 5:46 PM Grigoriy Mylnikov
wrote:
> 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
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.
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
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
Hi Grigoriy,
why don't you do the multiply in the shader like you do with gl_vertex?
- Werner -
Am 16.11.2018 um 12:29 schrieb Grigoriy Mylnikov:
> 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
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
I think the osgUtil/ShaderGen code might be GLES2 compatible now. Try
running it on your model, and dump the shader that it creates to see if
it's creating Uniforms for lighting or not.
It might or might not be using the osg::Light as a basis. Do you HAVE to
use osg::Light or could you get by
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
Hi,
I am developing an application for iPhone and iPod touch using OpenSceneGraph.
In origin I written my own shaders and I used to control light using a uniform.
It was working. Now I wanted to switch to use osg::Light and osg::LightSource
because I think it is more object-oriented, but when
Hi John,
You need use your own shaders as GLES2 does not support materials or OpenGL
lighting. AFAIK shader generator to emulate fixed pipeline is a work in
progress, but it's not completed yet.
Cheers.
2012/5/27 John Moore kahar...@gmail.com
Hi,
I am developing an application for iPhone
On Sun, May 27, 2012 at 10:45 AM, John Moore kahar...@gmail.com wrote:
Hi,
I am developing an application for iPhone and iPod touch using
OpenSceneGraph. In origin I written my own shaders and I used to control
light using a uniform. It was working. Now I wanted to switch to use
osg::Light
14 matches
Mail list logo