Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 878 vs 879 for /trunk/assets/shaders/GLSL/common/nodeBufferedInput.cmn

Diff revisions: vs.
  @@ -33,12 +33,16 @@
33 33 return dvd_Matrices[index]._worldMatrix;
34 34 }
35 35
36 + mat4 dvd_WorldViewMatrix(in uint index) {
37 + return dvd_ViewMatrix * dvd_WorldMatrix(index);
38 + }
39 +
36 40 mat3 dvd_NormalMatrixWV(in uint index) {
37 41 return mat3(dvd_Matrices[index]._normalMatrixWV);
38 42 }
39 43
40 - ivec4 dvd_BufferIntegerValues() {
41 - return ivec4(dvd_Matrices[VAR.dvd_drawID]._properties);
44 + ivec4 dvd_BufferIntegerValues(in uint index) {
45 + return ivec4(dvd_Matrices[index]._properties);
42 46 }
43 47
44 48
  @@ -47,7 +51,7 @@
47 51 #endif
48 52
49 53 // x - isSelected/isHighlighted; y - isShadowMapped; z - lodLevel, w - occlusion cull data
50 - #define dvd_lodLevel dvd_BufferIntegerValues().z
54 + #define dvd_lodLevel(X) dvd_BufferIntegerValues(X).z
51 55 #define dvd_customData dvd_Matrices[VAR.dvd_drawID]._properties.w
52 56 #define dvd_reflectionIndex uint(dvd_Matrices[VAR.dvd_drawID]._normalMatrixWV[1][3])
53 57 #define dvd_refractionIndex uint(dvd_Matrices[VAR.dvd_drawID]._normalMatrixWV[2][3])
  @@ -56,9 +60,9 @@
56 60 // x - useAlphaTest; y - textureOperation; z - parallax/relief mapping factor, w - reserved
57 61 #define buffer_matProperties dvd_Matrices[VAR.dvd_drawID]._colourMatrix[3]
58 62
59 - #define dvd_isSelected (dvd_BufferIntegerValues().x < -0.5)
60 - #define dvd_isHighlighted (dvd_BufferIntegerValues().x > 0.5)
61 - #define dvd_shadowMapping (dvd_BufferIntegerValues().y > 0.0)
63 + #define dvd_isSelected (dvd_BufferIntegerValues(VAR.dvd_drawID).x < -0.5)
64 + #define dvd_isHighlighted (dvd_BufferIntegerValues(VAR.dvd_drawID).x > 0.5)
65 + #define dvd_shadowMapping (dvd_BufferIntegerValues(VAR.dvd_drawID).y > 0.0)
62 66 #define dvd_useAlphaTest (buffer_matProperties.x > 0.0)
63 67 #define dvd_texOperation uint(buffer_matProperties.y)
64 68 #define dvd_parallaxFactor buffer_matProperties.z