summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorgman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-18 18:12:41 +0000
committergman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-18 18:12:41 +0000
commit017a5758d9b847dcb18de3b5937c1886aedd06d9 (patch)
tree95780e59bde28deea0c23d0eff87ef7b42496eb5 /o3d
parent3148ba845bc58491770770a059f5d3144e79b377 (diff)
downloadchromium_src-017a5758d9b847dcb18de3b5937c1886aedd06d9.zip
chromium_src-017a5758d9b847dcb18de3b5937c1886aedd06d9.tar.gz
chromium_src-017a5758d9b847dcb18de3b5937c1886aedd06d9.tar.bz2
This fixes a bug in the 2d particle shader that made
them ignore transform orientation. Review URL: http://codereview.chromium.org/647008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39370 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r--o3d/samples/o3djs/particles.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/o3d/samples/o3djs/particles.js b/o3d/samples/o3djs/particles.js
index 2d71b14..12e7f37 100644
--- a/o3d/samples/o3djs/particles.js
+++ b/o3d/samples/o3djs/particles.js
@@ -214,7 +214,8 @@ o3djs.particles.FX_STRINGS = [
' float2 uv = input.uvLifeTimeFrameStart.xy;\n' +
' float lifeTime = input.uvLifeTimeFrameStart.z;\n' +
' float frameStart = input.uvLifeTimeFrameStart.w;\n' +
- ' float3 position = input.positionStartTime.xyz;\n' +
+ ' float3 position = mul(float4(input.positionStartTime.xyz, 1),\n' +
+ ' world).xyz;\n' +
' float startTime = input.positionStartTime.w;\n' +
' float3 velocity = mul(float4(input.velocityStartSize.xyz, 0),\n' +
' world).xyz + worldVelocity;\n' +
@@ -252,7 +253,7 @@ o3djs.particles.FX_STRINGS = [
' acceleration * localTime * localTime + \n' +
' position;\n' +
'\n' +
- ' output.position = mul(float4(localPosition + world[3].xyz, 1), \n' +
+ ' output.position = mul(float4(localPosition, 1), \n' +
' viewProjection);\n' +
' output.percentLife = percentLife;\n' +
' return output;\n' +