Nuke binary plugins 15.0.5
 
Loading...
Searching...
No Matches
DD::Image::VertexContext Class Reference

#include <VertexContext.h>

Public Types

typedef void(* TextureSampler) (Iop *material, const Vector2 &center, const Vector2 &dU, const Vector2 &dV, TextureFilter *f, Pixel &out, void *context)
 

Public Member Functions

 VertexContext (const VertexContext &vtx)
 
Scenescene () const
 
void set_scene (Scene *s)
 
const GeoInfogeoinfo () const
 
void set_geoinfo (const GeoInfo *g)
 
const Primitiveprimitive () const
 
void set_primitive (const Primitive *p)
 
const GeoInfoRenderStateget_renderstate () const
 
void set_renderstate (const GeoInfoRenderState *r)
 
rPrimitiverprimitive () const
 
void set_rprimitive (rPrimitive *rp)
 
Ioprmaterial () const
 
void set_rmaterial (Iop *m)
 
Box3face_uv_bbox ()
 
unsigned & face_clipmask ()
 
void set_transforms (MatrixArray *m)
 
MatrixArraytransforms () const
 
const Matrix4matrix (int n) const
 
const Matrix4inverse_matrix (int n) const
 
PrimitiveTestCacheray_test_cache () const
 
void set_ray_test_cache (PrimitiveTestCache *r)
 
TextureSampler texture_sampler () const
 
void set_texture_sampler (TextureSampler t)
 
Vector4P () const
 
Vector4dPdu () const
 
Vector4dPdv () const
 
float x () const
 
float y () const
 
float z () const
 
float w () const
 
Vector3PL () const
 
Vector3dPLdu () const
 
Vector3dPLdv () const
 
Vector3PW () const
 
Vector3dPWdu () const
 
Vector3dPWdv () const
 
Vector3MB () const
 
Vector3dMBdu () const
 
Vector3dMBdv () const
 
Vector4UV () const
 
Vector4dUVdu () const
 
Vector4dUVdv () const
 
Vector3N () const
 
Vector3dNdu () const
 
Vector3dNdv () const
 
Vector4Cf () const
 
Vector4dCfdu () const
 
Vector4dCfdv () const
 
float r () const
 
float g () const
 
float b () const
 
float a () const
 
Vector3VEL () const
 
Vector3dVELdu () const
 
Vector3dVELdv () const
 
void sample (Iop *material, Pixel &out) const
 

Public Attributes

VArray vP
 Current values for fragment_shader.
 
VArray vdX
 Change if X of render pixel is increased by 1.
 
VArray vdY
 Change if Y of render pixel is increased by 1.
 
Vector3 ambient
 Global ambient setting.
 
Iopblending_shader
 
bool texture_sampling
 
void * render_context
 

Detailed Description

This class is intended to be passed up a vertex shader tree. It's initialized with basic vertex info like the point location, a UV coordinate and a normal. A shader can then modify the parameters producing effects like point displacement, UV projection, and normal remapping.

Member Typedef Documentation

◆ TextureSampler

typedef void(* DD::Image::VertexContext::TextureSampler) (Iop *material, const Vector2 &center, const Vector2 &dU, const Vector2 &dV, TextureFilter *f, Pixel &out, void *context)

Callback to redefine the texture sampler

Member Function Documentation

◆ sample()

void VertexContext::sample ( Iop material,
Pixel out 
) const

Use the UV and the derivatives of UV to sample the incoming image. UV of 0,0 is mapped to the lower-left corner of the image's format, and 1,1 is mapped to the upper-right corner.

References DD::Image::IopInfoOwner::channels(), DD::Image::ChannelSet::contains(), DD::Image::IopInfoOwner::format(), DD::Image::Box::h(), DD::Image::Iop::sample(), DD::Image::Box::w(), DD::Image::Box::x(), and DD::Image::Box::y().

Referenced by DD::Image::Render::draw_primitives(), and DD::Image::Iop::fragment_shader().

Member Data Documentation

◆ blending_shader

Iop* DD::Image::VertexContext::blending_shader

Points at the final shader in the chain.

Referenced by DD::Image::Iop::fragment_shader(), and DD::Image::Render::Span::initialize().

◆ texture_sampling

bool DD::Image::VertexContext::texture_sampling

Whether shaders should sample their textures.

Referenced by DD::Image::Iop::fragment_shader(), and DD::Image::Render::Span::initialize().



©2024 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.foundry.com