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: Mukund

Page 1 of 9 1 2 3 4

Search: Search took 0.42 seconds.

  1. Replies
    2
    Views
    823

    Re: Regarding the projective space

    Thanks for the reply mbentrup!
  2. Replies
    2
    Views
    823

    Regarding the projective space

    Hello All!

    I am reading this excellent collection of articles on projective spaces, transformations etc.

    I came across this sentence:


    LINK

    I'm not able to understand what exactly...
  3. Replies
    4
    Views
    1,005

    Re: Regarding "A pixel is not a little square"

    Thanks for the replies. So, he just means to say, the color at a pixel could be the result of samples from many neighbouring pixels, and not just one pixel?
  4. Replies
    4
    Views
    1,005

    Regarding "A pixel is not a little square"

    Hello All!

    This is with reference to the famous article "A pixel is not a little square" by Alvy Ray Smith. Well i tried reading it a couple of times. But i got lost somewhere after the second...
  5. Thread: Billboarding

    by Mukund
    Replies
    0
    Views
    636

    Billboarding

    Hello,

    I am trying to get billboarding to work. I needed a little clarification. This is the way i tried:

    From the modelview, i obtain the following:



    -- --
    | x1 y1 z1 ...
  6. Replies
    3
    Views
    522

    Re: zoomWithRespect to model center point.

    Hello,

    You can try this:

    Say the model is at (Wx, Wy, Wz) in world coordinates, bring the model to the origin. So, do a translate of (-Wx, -Wy, -Wz). Scale it, then translate back.

    So, your...
  7. Replies
    3
    Views
    412

    Re: Suggestion regarding book

    Thanks for the suggestions mobeen, tksuoran.
  8. Replies
    3
    Views
    412

    Suggestion regarding book

    Hello everyone,

    I was looking for a book that explains in depth about lighting in Computer Graphics. The books i read used to deal with lighting in a brief manner. i.e provide a lighting...
  9. Replies
    7
    Views
    1,720

    Re: Regarding use of Multiple Shaders

    Thanks for the suggestion thokra!
  10. Replies
    7
    Views
    1,720

    Re: Regarding use of Multiple Shaders

    Thanks for the reply Thokra

    What is the general approach followed? In case of games they have so many complex animation effects. They would be using mutiple shaders right? Having multiple effects...
  11. Replies
    7
    Views
    1,720

    Regarding use of Multiple Shaders

    Hello everyone,

    I have a bunch of animations done in a scene. These animation effects are achieved in different shaders. This is how I'm using multiple shaders.



    void renderScene(void)
    {
    ...
  12. Replies
    3
    Views
    443

    Re: Bypass parts of pipeline

    Thanks for the answers :)
  13. Replies
    3
    Views
    443

    Bypass parts of pipeline

    Hello everyone,

    I was wondering if its possible to obtain the contents of the framebuffer, then update it somehow and then get it back refreshed on the screen?
    Well i could use an FBO, render to...
  14. Thread: drawing problem

    by Mukund
    Replies
    2
    Views
    325

    Re: drawing problem

    Giving Z as 0.0f would definitely not work. That is behind the specified near plane.

    Try to visualize the frustum and verify if your object is within the view frustum.

    Convert the...
  15. Replies
    5
    Views
    870

    Re: Light Source rotating with object

    Thanks Carsten Nuemann.



    Yes. I'm giving it in eye space.



    Yeah, i guess that was the problem. I increased the specular colour. Now it is better. But it looks quite different with the...
  16. Replies
    18
    Views
    3,706

    Re: How costly is a sqrt in a fragment shader?

    @aqnuep: Thanks!

    @Groovounet: Well GLSL version 1.2(the one i'm using) doesn't seem to support it. But yeah, i didn't know we could use mix that way from 4.0 onwards.
    Thanks!
  17. Replies
    18
    Views
    3,706

    Re: How costly is a sqrt in a fragment shader?

    Hmm, i came up with this one:


    float val = step(dis, 5.0);
    gl_FragColor = mix( color * vec4(0.5, 0.5, 0.5, 1.0),
    color * vec4(1.0, 1.0, 1.0, 1.0),
    ...
  18. Replies
    18
    Views
    3,706

    Re: How costly is a sqrt in a fragment shader?

    Thanks V-man, aqnuep, mbentrup.

    @V-man

    >> and then you change your "if (dis <= 5.0)"

    I didn't quite get you. Change that to what?
    Thanks!
  19. Replies
    18
    Views
    3,706

    Re: How costly is a sqrt in a fragment shader?

    Thanks for the reply aqnuep.

    >>Actually the branching (if) is much more costly.

    Well, i need to do the check every fragment. Any idea how i can make it better?

    Thanks!
  20. Replies
    18
    Views
    3,706

    How costly is a sqrt in a fragment shader?

    Hello all,

    This is my fragment shader:



    varying vec4 color;
    varying vec3 fragPos;
    uniform vec4 lightPos;
  21. Replies
    5
    Views
    870

    Re: Light Source rotating with object

    Ah, i'm sorry, i hadn't normalized the light vector.

    Here is the modified one:



    vec3 lightVec = normalize(lightPos.xyz);
    float lambertTerm = dot(normal, lightVec);

    Here is the snapshot:
  22. Replies
    5
    Views
    870

    Re: Light Source rotating with object

    Thanks Carsten Neumann. I fixed that problem. I'm now doing all calculations in eye space.
    Here is the new shader. I'm still doing a per vertex calculation and the specular component is totally off....
  23. Replies
    5
    Views
    870

    Light Source rotating with object

    Hello everyone,

    i wrote this simple shader for some lighting. The calculation of the specular component is borrowed from the Orange book.

    Here is the vertex shader:
    I'm trying a simple...
  24. Thread: MSAA with FBO

    by Mukund
    Replies
    5
    Views
    1,359

    Re: MSAA with FBO

    Hi,

    It was just a problem with enabling and disabling textures. Its solved now.

    Thanks.
  25. Thread: MSAA with FBO

    by Mukund
    Replies
    5
    Views
    1,359

    Re: MSAA with FBO

    Thanks for the reply Dark Photon.

    >> Check for GL errors
    Well, i am not getting any error reported.

    >> Try changing glClearColor to red before your glClear, comment out drawScene(), and see...
Results 1 to 25 of 207
Page 1 of 9 1 2 3 4