Skip to main content
added 82 characters in body
Source Link
philB
  • 159
  • 9

As expected the elongation on various horizontal plane can result from concatenation of matrices. given R the amount of elongation, H the height of a reflexion plane, and P the reflexion matrix for this plane:

PSTMat = P*XMMatrixScaling(1, R, 1)*XMMatrixTranslation(0, H*(1 - R), 0);

then concatenate PSTMat to the WorldMat of the object and the Scene ViewProj and use this during the reflexion map generation. In my shaders a fading effect is also added to vanish the object with the height.

for objects O GlobalMat = WorldMat*PSTMat*ViewProj;

A couple of screenshots in the figure show the result for A) R=1, B) R=2 qnd C) R=0.5. The rain comes from a simplified version of the NVidia rain demo. When used the reflexion map texcoords are "distorded" to givesgive the ripples with an animated ripple normalmap and some random offset with a noisy normalmap to simulate the impacts of drops.

enter image description here

As expected the elongation on various horizontal plane can result from concatenation of matrices. given R the amount of elongation, H the height of a reflexion plane, and P the reflexion matrix for this plane:

PSTMat = P*XMMatrixScaling(1, R, 1)*XMMatrixTranslation(0, H*(1 - R), 0);

then concatenate PSTMat to the WorldMat of the object and the Scene ViewProj and use this during the reflexion map generation.

for objects O GlobalMat = WorldMat*PSTMat*ViewProj;

A couple of screenshots in the figure show the result for A) R=1, B) R=2 qnd C) R=0.5. The rain comes from a simplified version of the NVidia rain demo. When used the reflexion map texcoords are "distorded" to gives the ripples and some random offset to simulate the impacts of drops.

enter image description here

As expected the elongation on various horizontal plane can result from concatenation of matrices. given R the amount of elongation, H the height of a reflexion plane, and P the reflexion matrix for this plane:

PSTMat = P*XMMatrixScaling(1, R, 1)*XMMatrixTranslation(0, H*(1 - R), 0);

then concatenate PSTMat to the WorldMat of the object and the Scene ViewProj and use this during the reflexion map generation. In my shaders a fading effect is also added to vanish the object with the height.

for objects O GlobalMat = WorldMat*PSTMat*ViewProj;

A couple of screenshots in the figure show the result for A) R=1, B) R=2 qnd C) R=0.5. The rain comes from a simplified version of the NVidia rain demo. When used the reflexion map texcoords are "distorded" to give the ripples with an animated ripple normalmap and some random offset with a noisy normalmap to simulate the impacts of drops.

enter image description here

Source Link
philB
  • 159
  • 9

As expected the elongation on various horizontal plane can result from concatenation of matrices. given R the amount of elongation, H the height of a reflexion plane, and P the reflexion matrix for this plane:

PSTMat = P*XMMatrixScaling(1, R, 1)*XMMatrixTranslation(0, H*(1 - R), 0);

then concatenate PSTMat to the WorldMat of the object and the Scene ViewProj and use this during the reflexion map generation.

for objects O GlobalMat = WorldMat*PSTMat*ViewProj;

A couple of screenshots in the figure show the result for A) R=1, B) R=2 qnd C) R=0.5. The rain comes from a simplified version of the NVidia rain demo. When used the reflexion map texcoords are "distorded" to gives the ripples and some random offset to simulate the impacts of drops.

enter image description here