forked from Dynamitos/Seele
Adding vertex input description, readding slang
This commit is contained in:
1 parent
0f6dabde86
commit
cb6b1815ee
16 files changed
+105
-12
No files matched your search
@@ -4,11 +4,10 @@ import MaterialParameter;
|
||||
import Scene;
|
||||
|
||||
[shader("vertex")]
|
||||
FragmentParameter vertexMain(
|
||||
uint vertexId: SV_VertexID,
|
||||
uint instanceId: SV_InstanceID,
|
||||
FragmentParameter vertexMain(
|
||||
VertexInput input
|
||||
){
|
||||
InstanceData inst = pScene.instances[instanceId];
|
||||
VertexAttributes attr = pVertexData.getAttributes(vertexId);
|
||||
InstanceData inst = pScene.instances[input.instanceId];
|
||||
VertexAttributes attr = pVertexData.getAttributes(input.vertexId);
|
||||
return attr.getParameter(inst.transformMatrix);
|
||||
}
|
||||
@@ -1,5 +1,11 @@
|
||||
import MaterialParameter;
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
uint vertexId;
|
||||
uint instanceId: SV_InstanceID;
|
||||
}
|
||||
|
||||
interface IVertexData
|
||||
{
|
||||
VertexAttributes getAttributes(uint index);
|
||||
|
||||
Reference in new issue
Block a user