Closed ZH-Hristov closed 1 year ago
i dont know of any way to do that but maybe devon knows
SetPixelShaderConstantFP(0, PARAM_COLOR2)
SetPixelShaderConstantFP(0, PARAM_COLOR2)
Tried this but it doesn't seem to work, at least when editing the per object sobel operator shader. Coloring the ent with the tool didn't change anything, whether the constant was set to the SBColor param or a different one.
The color tool doesn't set $COLOR2 To get the color of entity, use
SetPixelShaderStandardConstant(PSREG_DIFFUSE_MODULATION, STDCONST_DIFFUSE_MODULATION)
You also need to include shader_constant_register_map.h
so you can use PSREG_DIFFUSE_MODULATION in your shader code
Thanks! That works great!
https://user-images.githubusercontent.com/7620140/223880408-233464e8-1b6a-4538-be78-7b7813afbba2.mp4
Just trying to modify the sobel operator shader to sample it's color from the one set by the color tool. I'm new to this HLSL stuff but it seems fun to play around with.