# Search:

Type: Posts; User: Mukund

Page 1 of 9 1

by Mukund
Replies
2
Views
823

2. ## Thread: Regarding the projective space

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

I'm not able to understand what exactly...
3. ## Thread: Regarding "A pixel is not a little square"

by Mukund
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. ## Thread: Regarding "A pixel is not a little square"

by Mukund
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...

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. ## Thread: zoomWithRespect to model center point.

by Mukund
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. ## Thread: Suggestion regarding book

by Mukund
Replies
3
Views
412

### Re: Suggestion regarding book

Thanks for the suggestions mobeen, tksuoran.
8. ## Thread: Suggestion regarding book

by Mukund
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...

by Mukund
Replies
7
Views
1,720

### Re: Regarding use of Multiple Shaders

Thanks for the suggestion thokra!

by Mukund
Replies
7
Views
1,720

### Re: Regarding use of Multiple Shaders

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...

by Mukund
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)
{
...

by Mukund
Replies
3
Views
443

13. ## Thread: Bypass parts of pipeline

by Mukund
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...

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. ## Thread: Light Source rotating with object

by Mukund
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. ## Thread: How costly is a sqrt in a fragment shader?

by Mukund
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. ## Thread: How costly is a sqrt in a fragment shader?

by Mukund
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. ## Thread: How costly is a sqrt in a fragment shader?

by Mukund
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. ## Thread: How costly is a sqrt in a fragment shader?

by Mukund
Replies
18
Views
3,706

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

>>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. ## Thread: How costly is a sqrt in a fragment shader?

by Mukund
Replies
18
Views
3,706

### How costly is a sqrt in a fragment shader?

Hello all,

varying vec4 color;
varying vec3 fragPos;
uniform vec4 lightPos;
21. ## Thread: Light Source rotating with object

by Mukund
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. ## Thread: Light Source rotating with object

by Mukund
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. ## Thread: Light Source rotating with object

by Mukund
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.

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