Questions tagged [function]

3 questions
10
votes
1 answer

Reasons of the assumptions for the microfacet distribution function?

The paper Microfacet Models for Refraction through Rough Surfaces (among others) reminds us the following assumptions about the microfacet distribution function D: Microfacet density is positive valued Total microsurface area is at least as large…
wip
  • 1,809
  • 1
  • 12
  • 26
5
votes
1 answer

Why does the G1 term have a 2 in the numerator in Walter's formula, but not in Heitz's generalized formula?

In Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs, Eric Heitz derives the Separable Masking and Shadowing function as (P.83-84): In the mentioned Microfacet Models for Refraction through Rough Surfaces by Walter et al.,…
wip
  • 1,809
  • 1
  • 12
  • 26
2
votes
0 answers

GLSL, Fragment Shader: How to separate functions (like noise, transform...) to reuse in different projects

I'm a total newbie to coding and recently got interested into generative art. This is my problem: I have to copy all of the functions I need (and there are a lot) in every single fragment file I'm working on. I'm wondering if there is a way to keep…