Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_codegen.c
| Show First 20 Lines • Show All 381 Lines • ▼ Show 20 Lines | const char *GPU_builtin_name(GPUBuiltin builtin) | ||||
| else if (builtin == GPU_VIEW_NORMAL) | else if (builtin == GPU_VIEW_NORMAL) | ||||
| return "varnormal"; | return "varnormal"; | ||||
| else if (builtin == GPU_OBCOLOR) | else if (builtin == GPU_OBCOLOR) | ||||
| return "unfobcolor"; | return "unfobcolor"; | ||||
| else if (builtin == GPU_AUTO_BUMPSCALE) | else if (builtin == GPU_AUTO_BUMPSCALE) | ||||
| return "unfobautobumpscale"; | return "unfobautobumpscale"; | ||||
| else if (builtin == GPU_CAMERA_TEXCO_FACTORS) | else if (builtin == GPU_CAMERA_TEXCO_FACTORS) | ||||
| return "unfcameratexfactors"; | return "unfcameratexfactors"; | ||||
| else if (builtin == GPU_PARTICLE_SCALAR_PROPS) | |||||
| return "unfparticlescalarprops"; | |||||
| else if (builtin == GPU_PARTICLE_LOCATION) | |||||
| return "unfparticleco"; | |||||
| else if (builtin == GPU_PARTICLE_VELOCITY) | |||||
| return "unfparticlevel"; | |||||
| else if (builtin == GPU_PARTICLE_ANG_VELOCITY) | |||||
| return "unfparticleangvel"; | |||||
| else | else | ||||
| return ""; | return ""; | ||||
| } | } | ||||
| /* assign only one texid per buffer to avoid sampling the same texture twice */ | /* assign only one texid per buffer to avoid sampling the same texture twice */ | ||||
| static void codegen_set_texid(GHash *bindhash, GPUInput *input, int *texid, void *key) | static void codegen_set_texid(GHash *bindhash, GPUInput *input, int *texid, void *key) | ||||
| { | { | ||||
| if (BLI_ghash_haskey(bindhash, key)) { | if (BLI_ghash_haskey(bindhash, key)) { | ||||
| ▲ Show 20 Lines • Show All 1,092 Lines • Show Last 20 Lines | |||||