Revision 36d65d88
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/library/effect/VertexEffect.java | ||
---|---|---|
58 | 58 |
{ |
59 | 59 |
return |
60 | 60 |
|
61 |
"if( vName[i]=="+effect+" && (int(a_Association) & vAssociation[i]) != 0 )\n" +
|
|
61 |
"if( vName[i]=="+effect+" )\n" + |
|
62 | 62 |
"{\n" + |
63 | 63 |
code +"\n" + |
64 | 64 |
"}\n" + |
... | ... | |
194 | 194 |
* |
195 | 195 |
* This creates an association between this Vertex Effect and a Component of a Mesh. |
196 | 196 |
* One can set the association of an Effect and of a Component, and the Effect will only be active on |
197 |
* vertices of Components such that (effect assoc) & (component assoc) != 0. (see retSection() above) |
|
197 |
* vertices of Components such that |
|
198 |
* |
|
199 |
* (effect assoc) & (component assoc) != 0 || (effect component) == (mesh component) |
|
200 |
* |
|
201 |
* (see main_vertex_shader) |
|
198 | 202 |
* |
199 | 203 |
* The point: this way we can configure the system so that each Vertex Effect acts only on a certain |
200 | 204 |
* subset of a Mesh, thus potentially significantly reducing the number of render calls. |
201 | 205 |
*/ |
202 |
public void setMeshAssociation(int association) |
|
206 |
public void setMeshAssociation(int component, int association)
|
|
203 | 207 |
{ |
208 |
mComponent = component; |
|
204 | 209 |
mAssociation = association; |
205 | 210 |
} |
206 | 211 |
} |
Also available in: Unified diff
Progress making it possible to apply Vertex Effects only to some Components of a Mesh.