Questions tagged [shading]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
14 votes
2 answers
22k views

Programmatically generating vertex normals

I'm working with Kinect face api, it provides an array of vertices and indices for triangles which is to be rendered to make the face image. The no of vertices and their order in array as well as the ...
Allahjane's user avatar
  • 243
13 votes
3 answers
438 views

Is a Lambertian reflector illuminated by a smaller fraction of the incident radiation when it's tilted?

In reading about Lambertian reflectance on Wikipedia I found the following phrase (in bold) which doesn't sound right to me: In computer graphics, Lambertian reflection is often used as a model for ...
trichoplax is on Codidact now's user avatar
10 votes
1 answer
901 views

Trying to implement Microfacet BRDF but my result images are wrong

I am trying to implement microfacet BRDF model. I am reading Sebastien Lagarde's slides. I implemented formulas to my code but i think result image is wrong. Yellow is base color of material. ...
hmkum's user avatar
  • 131
8 votes
1 answer
3k views

What's the difference between geometric surface normal and shading surface normal?

In my opinion, geometric surface normal is the cross product of triangle edge vectors, and shading surface normal is the interpolation of the predefined normals at the three vertexes. I used Mitsuba ...
chaosink's user avatar
  • 591
3 votes
1 answer
2k views

How to dynamically calculate texture coordinates in a vertex shader with OpenGL?

I modified my code, and tried to pass a set of integers specifying the face of a cube (top, bottom left...) to the vertex shader in order to draw multiple instances of a cube face. I did this by ...
Makogan's user avatar
  • 1,696
3 votes
1 answer
194 views

Paper for the approximation formula provided by Brian Karis

In these slides, specifically page 11, the following formula is reported: $$ \frac{1}{N} \sum_{k=1}^N \frac{L_i(l_k)f(l_k,v)\cos(\theta_{l_k})}{p(l_k,v)} \approx \left( \frac{1}{N} \sum_{k=1}^N L_i(...
user8469759's user avatar
1 vote
1 answer
111 views

Why do 3d modeling packages use a single normal per polygon and how is this viable for smooth shading

If we have a quad that is non-planar. Why do most 3d modeling packages choose to use a single normal for the quad (Specifically for Blender3d by using cross product of two edge's vectors that do not ...
Lenny White's user avatar