An open API service indexing awesome lists of open source software.

https://github.com/xjine/unity_billboardshader

These quads always show their faces to the camera.
https://github.com/xjine/unity_billboardshader

billboard shader unity

Last synced: about 1 year ago
JSON representation

These quads always show their faces to the camera.

Awesome Lists containing this project

README

          

# Unity_BillboardShader

These quads always show their faces to the camera.

```hlsl
v2f vert (appdata_full v)
{
v2f o;

float3 vpos = mul(unity_ObjectToWorld, v.vertex.xyz);
float4 worldCoord = float4(unity_ObjectToWorld._m03_m13_m23, 1);
float4 viewPos = mul(UNITY_MATRIX_V, worldCoord) + float4(vpos, 0);

o.vertex = mul(UNITY_MATRIX_P, viewPos);
o.uv = v.texcoord;

return o;
}
```