Module gpuFlux

Class FluxGGXShader


public class FluxGGXShader extends FluxShader
GPU (GPUFlux / OpenCL) wrapper for the GGX microfacet BRDF shader.

Serialisation layout (matches ggxshader.h GGXShader struct):

   int   type                = SHADER_GGX (5)
   int   diffuse             channel offset
   int   specular            channel offset  (F0)
   int   roughness           channel offset  (alpha)
   int   transparency        channel offset  (-1 = opaque, delta BTDF)
   int   diffuseTransparency channel offset  (-1 = none,  Lambertian BTDF)
   int   emissive             channel offset  (-1 = none,  self-emission)
 
Author:
MH at YNL 2026
  • Field Details

    • DEFAULT_DIFFUSE

      public static final ColorMap DEFAULT_DIFFUSE
    • DEFAULT_SPECULAR

      public static final ColorMap DEFAULT_SPECULAR
      F₀ default: 4% reflectance at normal incidence (typical dielectric).
    • DEFAULT_ROUGHNESS

      public static final ColorMap DEFAULT_ROUGHNESS
  • Constructor Details

    • FluxGGXShader

      public FluxGGXShader(GGX ggx, FluxChannelMapBuilder channelBuilder)
      Builds GPU channel maps from the given GGX material node.
      Parameters:
      ggx - the GGX material to serialise
      channelBuilder - builder used to allocate GPU channel offsets
  • Method Details