|
Is it possible to get the current Object's 'base' world position in a vertex function? I was thinking something like this: float3 baseWorldPos = mul ( _Object2World, float4(0,0,0,0) ).xyz; ...but on testing I'm fairly certain it's returning a zero vector ( because its a multiplication? ). Otherwise is there another way to get a distinct value per object, so that a shader's effects can be made unique for each individual object? Thanks.
(comments are locked)
|
|
To get the position, you need to transform float4(0,0,0,1).
(comments are locked)
|
