Questions tagged [pixel-shading]
27 questions
5
votes
1 answer
Android GLES20.glBlendEquation not working?
Ive been trying to make a 2.5D engine with depth and normal map textures for a few weeks now, not unlike whats used here Linky. After thinking the drawing of a depth map in the fragment shader from a texture was impossible due to ES 2.0 missing the…

user1005998
- 51
- 3
4
votes
2 answers
gl_PointSize OpenGLES clarification
What does setting gl_PointSize = 1.0 in vertex shader means or achieve? Does that mean the vertex itself is a pixel?

Deepak Sharma
- 5,577
- 7
- 55
- 131
3
votes
1 answer
blinn-phong shading with numpy
I am trying to implement blinn-phong shading in numpy for educational purposes. However I am stuck at debugging what parameters are doing for several days now.
My general idea was the following. Since the equation was given for a channel. I apply…

Kaan E.
- 515
- 4
- 16
3
votes
1 answer
How to enable per pixel shading in Ogre3d
I am lighting a plane with a spot light in Ogre3D. However, the edge on the hotspot shows zigzag effect. It looks like the shading on the plane is done at every vertex without any interpolation.
The wireframe rendering result is shown below:
How…

shapeare
- 4,133
- 7
- 28
- 39
2
votes
1 answer
C++ OpenGL: Ray Trace Shading Isn't Properly Shading
I'm a CS student and for our final we were told to construct the reflections on multiple spheres via ray tracing. That's almost literally what we got for directions except a picture for how it should look when finished. So I need spheres, with…

Cobaltsam
- 21
- 1
- 2
2
votes
1 answer
realtime terrain lighting
What would be the best way to provide realtime lighting in an OpenGL terrain scene? The level of detail between of each quad will be generated dynamically as it is subdivided as it zooms in, so a pre-calculated light source will not work. I would…

oldSkool
- 1,212
- 5
- 14
- 29
2
votes
1 answer
Restricting Pixel shader on particular area of image
Is there any way to restrict Pixel shader on particular area of image.
BR

Saghar
- 693
- 2
- 12
- 24
2
votes
5 answers
Lighting inside of a sphere?
I have this question in mind: I need to make a scene that looks like a real sky. My first idea was to make a cube and texturize it. It wasn't that good looking. I came up with the idea of using a sphere. But I couldn't light it from inside. I've put…

pooya
- 901
- 2
- 15
- 29
2
votes
1 answer
How to implement density maps with instanced rendering
I came across this amazing blog about rendering grass by Kévin Boulanger.
In his project he has used a certain density map:
The black areas represent places in 3D world where grass is to be rendered.
And white areas are where the grass is not…

2am
- 699
- 1
- 7
- 25
1
vote
1 answer
Issue creating map shading in Matplotlib imshow by setting opacity to data gradient
I am trying to add shading to a map of some data by calculating the gradient of the data and using it to set alpha values.
I start by loading my data (unfortunately I cannot share the data as it is being used in a number of manuscripts in…

MyCarta
- 808
- 2
- 12
- 37
1
vote
0 answers
illumination and shading for computer graphics
I am preparing for my test tomorrow and this is one of the practice questions. I solved it partially but I am confused with the rest. Here is the problem: Consider a gray world with no ambient and specular lighting ( only diffuse lighting). The…

Sam I Am
- 13
- 3
1
vote
2 answers
Simple Ray Tracer, Diffuse Shading problems c++
I'm writing a basic Ray-tracer in effort to better understand the whole thing. I've come across an issue that's been holding me back for a little while now, Diffuse shading of a sphere. I've used a formula from the following source to calculate…

Unknown
- 131
- 1
- 4
- 11
1
vote
0 answers
How to do phong shading in POV-ray
I am using POV-ray raytracer for rendering. I have a mesh of triangles, when I render that using :
mesh
{
triangle
{
< corner_1>, ,
}
}
I am not getting smooth shading, there is also a provision for…

user2481909
- 376
- 2
- 5
- 13
1
vote
2 answers
HLSL Shader (Phong /w normal map)
EDIT: IT seems like the only problem left now is that the light comes from the opposite direction if i use the calculation with a normal map. If i only use:
n = normalize(Input.NorView);
it seems to be fine.
I am starting to learn some HLSL Shading…

puelo
- 5,464
- 2
- 34
- 62
1
vote
1 answer
DirectX 9 Shading not linear?
I'm using managed DirectX9 with C#. I made a visualisation of a cnc machine.
On computer 1 it works perfectly. a round tube is bright grey on the left side, and the shading is linear to a dark grey.
On computer 2 i get something different (same…

user1095428
- 71
- 1
- 4