Blender  V3.3
Classes | Typedefs | Enumerations | Functions
gpu_node_graph.h File Reference
#include "DNA_customdata_types.h"
#include "DNA_listBase.h"
#include "BLI_ghash.h"
#include "GPU_material.h"
#include "GPU_shader.h"

Go to the source code of this file.

Classes

struct  GPUNode
 
struct  GPUNodeLink
 
struct  GPUOutput
 
struct  GPUInput
 
struct  GPUNodeGraphOutputLink
 
struct  GPUNodeGraphFunctionLink
 
struct  GPUNodeGraph
 

Typedefs

typedef enum eGPUDataSource eGPUDataSource
 
typedef struct GPUOutput GPUOutput
 
typedef struct GPUInput GPUInput
 
typedef struct GPUNodeGraphOutputLink GPUNodeGraphOutputLink
 
typedef struct GPUNodeGraphFunctionLink GPUNodeGraphFunctionLink
 
typedef struct GPUNodeGraph GPUNodeGraph
 

Enumerations

enum  eGPUDataSource {
  GPU_SOURCE_OUTPUT , GPU_SOURCE_CONSTANT , GPU_SOURCE_UNIFORM , GPU_SOURCE_ATTR ,
  GPU_SOURCE_UNIFORM_ATTR , GPU_SOURCE_STRUCT , GPU_SOURCE_TEX , GPU_SOURCE_TEX_TILED_MAPPING ,
  GPU_SOURCE_FUNCTION_CALL
}
 
enum  GPUNodeLinkType {
  GPU_NODE_LINK_NONE = 0 , GPU_NODE_LINK_ATTR , GPU_NODE_LINK_UNIFORM_ATTR , GPU_NODE_LINK_COLORBAND ,
  GPU_NODE_LINK_CONSTANT , GPU_NODE_LINK_IMAGE , GPU_NODE_LINK_IMAGE_TILED , GPU_NODE_LINK_IMAGE_TILED_MAPPING ,
  GPU_NODE_LINK_OUTPUT , GPU_NODE_LINK_UNIFORM , GPU_NODE_LINK_DIFFERENTIATE_FLOAT_FN
}
 
enum  eGPUNodeTag {
  GPU_NODE_TAG_NONE = 0 , GPU_NODE_TAG_SURFACE = (1 << 0) , GPU_NODE_TAG_VOLUME = (1 << 1) , GPU_NODE_TAG_DISPLACEMENT = (1 << 2) ,
  GPU_NODE_TAG_THICKNESS = (1 << 3) , GPU_NODE_TAG_AOV = (1 << 4) , GPU_NODE_TAG_FUNCTION = (1 << 5)
}
 

Functions

void gpu_node_graph_prune_unused (GPUNodeGraph *graph)
 
void gpu_node_graph_finalize_uniform_attrs (GPUNodeGraph *graph)
 
void gpu_node_graph_free_nodes (GPUNodeGraph *graph)
 
void gpu_node_graph_free (GPUNodeGraph *graph)
 
struct GPUNodeGraphgpu_material_node_graph (struct GPUMaterial *material)
 
struct GPUTexture ** gpu_material_ramp_texture_row_set (struct GPUMaterial *mat, int size, float *pixels, float *row)
 

Detailed Description

Intermediate node graph for generating GLSL shaders.

Definition in file gpu_node_graph.h.

Typedef Documentation

◆ eGPUDataSource

◆ GPUInput

typedef struct GPUInput GPUInput

◆ GPUNodeGraph

typedef struct GPUNodeGraph GPUNodeGraph

◆ GPUNodeGraphFunctionLink

◆ GPUNodeGraphOutputLink

◆ GPUOutput

typedef struct GPUOutput GPUOutput

Enumeration Type Documentation

◆ eGPUDataSource

Enumerator
GPU_SOURCE_OUTPUT 
GPU_SOURCE_CONSTANT 
GPU_SOURCE_UNIFORM 
GPU_SOURCE_ATTR 
GPU_SOURCE_UNIFORM_ATTR 
GPU_SOURCE_STRUCT 
GPU_SOURCE_TEX 
GPU_SOURCE_TEX_TILED_MAPPING 
GPU_SOURCE_FUNCTION_CALL 

Definition at line 28 of file gpu_node_graph.h.

◆ eGPUNodeTag

Enumerator
GPU_NODE_TAG_NONE 
GPU_NODE_TAG_SURFACE 
GPU_NODE_TAG_VOLUME 
GPU_NODE_TAG_DISPLACEMENT 
GPU_NODE_TAG_THICKNESS 
GPU_NODE_TAG_AOV 
GPU_NODE_TAG_FUNCTION 

Definition at line 54 of file gpu_node_graph.h.

◆ GPUNodeLinkType

Enumerator
GPU_NODE_LINK_NONE 
GPU_NODE_LINK_ATTR 
GPU_NODE_LINK_UNIFORM_ATTR 
GPU_NODE_LINK_COLORBAND 
GPU_NODE_LINK_CONSTANT 
GPU_NODE_LINK_IMAGE 
GPU_NODE_LINK_IMAGE_TILED 
GPU_NODE_LINK_IMAGE_TILED_MAPPING 
GPU_NODE_LINK_OUTPUT 
GPU_NODE_LINK_UNIFORM 
GPU_NODE_LINK_DIFFERENTIATE_FLOAT_FN 

Definition at line 40 of file gpu_node_graph.h.

Function Documentation

◆ gpu_material_node_graph()

struct GPUNodeGraph* gpu_material_node_graph ( struct GPUMaterial material)

◆ gpu_material_ramp_texture_row_set()

struct GPUTexture** gpu_material_ramp_texture_row_set ( struct GPUMaterial mat,
int  size,
float pixels,
float row 
)

◆ gpu_node_graph_finalize_uniform_attrs()

void gpu_node_graph_finalize_uniform_attrs ( GPUNodeGraph graph)

◆ gpu_node_graph_free()

void gpu_node_graph_free ( GPUNodeGraph graph)

Free both node graph and requested attributes and textures.

Definition at line 802 of file gpu_node_graph.c.

References BLI_freelistN(), BLI_gset_free(), gpu_node_graph_free_nodes(), GPU_uniform_attr_list_free(), graph, and NULL.

Referenced by GPU_material_compile(), gpu_material_free_single(), and GPU_material_from_nodetree().

◆ gpu_node_graph_free_nodes()

void gpu_node_graph_free_nodes ( GPUNodeGraph graph)

Free intermediate node graph.

Definition at line 788 of file gpu_node_graph.c.

References BLI_pophead(), gpu_node_free(), graph, node, and NULL.

Referenced by GPU_material_compile(), GPU_material_from_nodetree(), and gpu_node_graph_free().

◆ gpu_node_graph_prune_unused()

void gpu_node_graph_prune_unused ( GPUNodeGraph graph)