[osg-users] sending array as uniform to GLSL

2012-12-02 Thread Christian Rumpf
hello! By looking into Uniform class reference I figured out that there is no overloaded constructor for arrays (or int*, float* etc.). Is it even possible to have an array (stack and/or heap) as uniform? lg Christian -- Read this topic online here: http://forum.openscenegraph.

[osg-users] Shader reloading

2012-09-24 Thread Christian Rumpf
hello! I'm trying to simulate noise effects in real time using OSG and GLSL. I rendered to texture a scene to get a sampler2D. Mu and Sigma for noise simulation are static. My idea is to reload fragment shader in a while loop with a random number as uniform because GLSL's noise() function doesn

[osg-users] image processing with OSG

2012-08-01 Thread Christian Rumpf
Hello! For one of my project I want to create an average image consisting of 10 images captured by a static camera to erase camera noise. I tried this stuff with OpenCV (http://opencv.willowgarage.com/wiki/) and its cv::Mat class and it worked well. I want to do the same with OSG by loading 10

Re: [osg-users] Render to texture, display pre-rendered scene

2012-06-25 Thread Christian Rumpf
robertosfield wrote: > Hi Christian, > > thank you > > Have a look at the osgdistortion example. > > Robert. > > On 25 June 2012 11:20, Christian Rumpf <> wrote: > > > Hey again. As I posted before I managed to render to texture a scene and > &

Re: [osg-users] Render to texture, display pre-rendered scene

2012-06-25 Thread Christian Rumpf
Hey again. As I posted before I managed to render to texture a scene and projected it onto a Geometry. But it is just an image of a scene and the RTT camera can't move around my object ("cessna.osg"). Is there a way to move the camera freely around like you would do with viewer's camera? lg Ch

Re: [osg-users] Render to texture, display pre-rendered scene

2012-06-11 Thread Christian Rumpf
No need anymore, Robert. I finally a homepage which explains everything about render to texture: http://beefdev.blogspot.de/2012/01/render-to-texture-in-openscenegraph.html It really helped me, and I finally could load my shader files with texture as uniform sampler2D. Nevertheless thank you ve

Re: [osg-users] Render to texture, display pre-rendered scene

2012-06-11 Thread Christian Rumpf
This really sounds helpful, Robert, but for some reason this examples you recommended aren't understandable for me. They all tells about reflecting, printing it into a flag and so on. isn't there an example which just renders a single node, a single box or something else into a texture and proje

[osg-users] Render to texture, display pre-rendered scene

2012-06-07 Thread Christian Rumpf
Hey! I read nearly everything about render to texture techniques and what you can do with them, but not how to SIMPLY display it. My intention is to pre-render the scene into a texture and sending this texture into my fragment shader (GLSL) to simulate blur effects. But before I can do this sh

[osg-users] [osgPPU] Problems installing osgPPU using cmake 2.8.4

2012-06-05 Thread Christian Rumpf
I tried to install the latest osgPPU version I found today, using cmake 2.8.4 and Visual Studio 10, but when i started to configure the folder I got the following cmake-error: > Check for working C compiler using: Visual Studio 10 > Check for working C compiler using: Visual Studio 10 -- works

[osg-users] osgDB::readImageFile don't work correctly

2012-05-31 Thread Christian Rumpf
Hi, I wanted to experiment a little bit with osg::Image, but when I used osgDB::readImageFile("..."); in my beginner's guide to read a png, I got the following message: > Warning: Could not find plugin to read objects from file "clockface.jpg". I installed osg-library according to osg guide

Re: [osg-users] OSG fragment shader

2012-05-31 Thread Christian Rumpf
the image processing effect should work in realtime (i.e. blur shading). shall I send the texture coordinates from vertex shader into fragment shader or is it ok to just use a fragment shader for image processing? My intenstion: I have to create a scene where I can freely move my camera. I can

[osg-users] OSG fragment shader

2012-05-25 Thread Christian Rumpf
Hello everyone! I just learned GLSL and image processing using different filter masks. Now I want to implement this into my OSG-project, but my test object (a cow ^^) is black, totally black. For the beginning I used the following code for fragment shader: Code: uniform sampler2D image; voi