Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Search:

Type: Posts; User: Pody

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Re: Shader instruction limits & OpenGL fixed functionality

    I tried to use just one function for the light calculation:


    void generalLight(in int i, in vec3 normal, in vec3 eye, in vec3 ecPosition3)
    {
    float nDotVP; // normal . light direction...
  2. Re: Shader instruction limits & OpenGL fixed functionality

    Thanks,
    I made it work with the suggestion by Humus to use an array of booleans to store the lights status.
    I don't understand why, though.
    I also would like to understand what help could bring...
  3. Shader instruction limits & OpenGL fixed functionality

    Hi, I'm trying to do a shader to replicate the OpenGL fixed functionality as a starting point to add new effects, but the compiler gives an error during linking about too many instructions.
    I have a...
  4. Thread: Normals matrix

    by Pody
    Replies
    3
    Views
    381

    Re: Normals matrix

    My matrix may contain scaling factors... that is why I whant to know if there's a way to preprocess the matrix so that the normals don't have to be re-normalized after the transformation
  5. Thread: Normals matrix

    by Pody
    Replies
    3
    Views
    381

    Normals matrix

    According to all the sources I searched on the internet and on books, when transforming an object with a matrix, to correctly transform the normals you have to multiply them by the matrix t(inv(M)),...
  6. Replies
    3
    Views
    181

    Re: Transparency and hardware acceleration

    Thanks a lot!
    Using glPolygonOffset() solves the problem :)
    Ciao
  7. Replies
    3
    Views
    181

    Transparency and hardware acceleration

    Hi,
    I'm drawing an object twice with alpha blending enabled (on the second draw pass) in order to have a transparent environment mapping on it.
    I noticed that with hardware acceleration disabled...
  8. Replies
    3
    Views
    140

    Re: Orthographic environment mapping

    Thanks a lot, that solved my problem!
    http://www.opengl.org/discussion_boards/ubb/smile.gif
    Bye
  9. Replies
    3
    Views
    140

    Re: Orthographic environment mapping

    I tried to adjust my cameras and now the environment looks fine.
    Now there's a new problem: when I switch the scene to orthographic mode, the object (i.e. teapot) is strangely clipped.
    The...
  10. Replies
    3
    Views
    140

    Orthographic environment mapping

    Is spherical environment mapping supposed to work well with orthographic projection? With a perspective camera all works fine, but when I change to an orthographic camera, the mapping is all messed...
  11. Replies
    1
    Views
    236

    Harmonic Maps help

    Hi, is there anybody who knows how to calculate the approximation of harmonic map by solving the sparse linear least square problem to minimize the energy E_harm?
    I'm following the article...
  12. Replies
    12
    Views
    592

    Re: is this a problem with normals?

    I use glShadeModel(GL_SMOOTH),
    and i calculate the average normals (in the lines
    v[0]+=x;
    v[1]+=y;
    v[2]+=z;

    and
    v[0]/=count;
    v[1]/=count;
    v[2]/=count;
  13. Replies
    12
    Views
    592

    Re: is this a problem with normals?

    they don't overlap
  14. Replies
    12
    Views
    592

    Re: is this a problem with normals?

    the line which doesn't make sense was the continuation of
    "centroid[j]=(el->vertTab[v[0]+j]+el->vertTab
    "
    i made a mistake while cut-and-pasting.
    Well, I actually delete the old faces.
    in...
  15. Replies
    12
    Views
    592

    Re: is this a problem with normals?

    ehm the line
    "centroid[j]=(el->vertTab[v[0]+j]+el->vertTab[v[1]+j]+el->vertTab[v[2]+j])/3.0;"
    is also inside the "for" statement.
    and
    pos[0] holds the index of the vertex mid0
    pos[1] of mid1...
  16. Replies
    12
    Views
    592

    Re: is this a problem with normals?

    I tried flipping the normals, but everything goes black.
    Here's how i calculate the centroid and the midpoint of the edges for each triangle
    centroid[j]=(el->vertTab[v[0]+j]+el->vertTab
    for...
  17. Replies
    12
    Views
    592

    Re: is this a problem with normals?

    I did some step by step tests, and the normals should be calculated well.
    The polygons are also in the same order.
    http://www.opengl.org/discussion_boards/ubb/frown.gif
  18. Replies
    12
    Views
    592

    is this a problem with normals?

    In my program I first render a sphere made of triangles, then I subdivide all the triangles using their centroids, and mid points of the edges.
    Then I recalculate the normals and render it.
    When I...
  19. Thread: DXF normals

    by Pody
    Replies
    34
    Views
    3,299

    Re: DXF normals

    In fact, for example, i exported in DXF a face from 3ds Max, and my program renders it very well! http://www.opengl.org/discussion_boards/ubb/smile.gif
  20. Thread: DXF normals

    by Pody
    Replies
    34
    Views
    3,299

    Re: DXF normals

    Ok, so it's not my fault if some polygons are reversed!
    http://www.opengl.org/discussion_boards/ubb/smile.gif
    thanks for the explanation!
    Bye
    Luca
  21. Thread: Light Problem

    by Pody
    Replies
    8
    Views
    571

    Re: Light Problem

    YESSSSSS!!!!
    THANK YOU SO MUCH!!!!!
    I'M SOOOO DUMB!!!!
    I tried doing a thousand changes except that fourth parameter which i left to 0.0!
    I didn't understand well the difference between a spot...
  22. Thread: Light Problem

    by Pody
    Replies
    8
    Views
    571

    Re: Light Problem

    It doesn't work. http://www.opengl.org/discussion_boards/ubb/frown.gif
    it seems to me that openGL applies the lighting to the object centered in the origin, and then places it in the real position.
  23. Thread: Light Problem

    by Pody
    Replies
    8
    Views
    571

    Re: Light Problem

    The problem is when i move the object: the light is not moved, but the object is lit as if it was still in the origin.
    I tried with some glPushMAtrix and glPopMatrix, but it didn't help ...
  24. Thread: Light Problem

    by Pody
    Replies
    8
    Views
    571

    Re: Light Problem

    mmm, I have the same problem if I move the object and not the light: the illumination doesn't change
  25. Thread: Light Problem

    by Pody
    Replies
    8
    Views
    571

    Light Problem

    In my program i load a DXF model, create a directional light and a camera, and move/rotate/translate/scale each of them.
    My problem is that the objects are positioned well, but are lit as if they...
Results 1 to 25 of 44
Page 1 of 2 1 2