Hi,
I have a model the geometry of which is being modified in real time and
therefore, the PER_VERTEX normal vectors have to be updated as well.
The modification of normals takes too much computing force, so I thought of
pushing the computation onto the GPU.
My question:
Is it possible to use
Hi Simon,
Am 22.03.2011 16:58, schrieb Simon Kolciter:
> Hi,
>
> I have a model the geometry of which is being modified in real time and
> therefore, the PER_VERTEX normal vectors have to be updated as well.
>
> The modification of normals takes too much computing force, so I thought of
> push
On 3/22/2011 9:58 AM, Simon Kolciter wrote:
> 1. Push the list of vertices and primitive indices to the GPU.
> 2. Call GLSL function.
Fine so far.
> 3. Pull the resulting list of normals from the GPU.
Good lord, why? You're going to USE them on-GPU aren't you? Pulling them back
across the
b
On 3/22/2011 10:27 AM, Peter Hrenka wrote:
> You could use a geometry shader to calculate
> the normals on the GPU. The geometry shader
> basically "sees" the whole primitive and can
> can therefore perform the normal calculation
> of a deforming geometry.
I have been told by some hardware engin
Hi Chris,
Am 22.03.2011 17:34, schrieb Chris 'Xenon' Hanson:
> On 3/22/2011 10:27 AM, Peter Hrenka wrote:
>> You could use a geometry shader to calculate
>> the normals on the GPU. The geometry shader
>> basically "sees" the whole primitive and can
>> can therefore perform the normal calculation
>
On 03/22/2011 12:31 PM, Chris 'Xenon' Hanson wrote:
You should be able to do what you're looking for on-GPU. There are some
cache and
read/write issues when you need to write to a data store and then immediately
read it back
and use it for drawing. Others can comment on that.
I haven't do
Well, the problem is that the normal vertices are PER_VERTEX, not PER_PRIMITIVE.
In Geometry shader, I only have access to the current primitive, not the whole
mesh, right?
I need to
1. calculate the normal vector of each face (triangle) and add it to the normal
vectors of all 3 vertices
2. n
On 3/22/2011 9:12 PM, Simon Kolciter wrote:
> Well, the problem is that the normal vertices are PER_VERTEX, not
> PER_PRIMITIVE.
> In Geometry shader, I only have access to the current primitive, not the
> whole mesh, right?
Correct.
> I need to
> 1. calculate the normal vector of each face (
Hi Simon,
Am 23.03.2011 04:12, schrieb Simon Kolciter:
> Well, the problem is that the normal vertices are PER_VERTEX, not
> PER_PRIMITIVE.
>
> In Geometry shader, I only have access to the current primitive, not the
> whole mesh, right?
In principle, you are right, the geometry shader can
onl
Ok, no access to the whole geometry in geometry shader.
However, since you can access to gl_Position of every vertex for a given
primitive, can't you also access gl_Normal of these vertices?
Because that would actually suffice.
--
Read this topic online here:
http://forum.opensc
On 3/23/2011 1:37 PM, Simon Kolciter wrote:
> Ok, no access to the whole geometry in geometry shader.
> However, since you can access to gl_Position of every vertex for a given
> primitive, can't you also access gl_Normal of these vertices?
Yes, I believe so.
> Because that would actually suff
On 3/23/2011 3:37 PM, Simon Kolciter wrote:
Ok, no access to the whole geometry in geometry shader.
However, since you can access to gl_Position of every vertex for a given
primitive, can't you also access gl_Normal of these vertices?
Accessing gl_Normal only makes sense if you've provide
Jason Daly:
What if I assign a normal array to the OSG Geometry (setNormalArray) and only
modify the values in geometry shader?
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37851#37851
___
osg-use
Hi, Simon
That dont make any difference. Why you want to do this? If you are going to
calculate normals in shader for just rendering - it would not make any
difference, because you not use values assigned in osg, just more overhead and
slower render. If you want to get calculated normals back t
14 matches
Mail list logo