Example #1
0
 private void SubscribeLazerEffectVariable(PlaneBoard planeBoard, Effect effect, ShaderResourceView arg3)
 {
     planeBoard.DefaultEffectSubscribe();
     int uvOffset = (int) (lastTime/100f)%8;
     effect.GetVariableBySemantic("TIME").AsScalar().Set(lastTime/100f);
     effect.GetVariableBySemantic("DIRECTION").AsVector().Set(Vector3.UnitZ);
     effect.GetVariableBySemantic("LENGTH").AsScalar().Set(200);//長さ
     effect.GetVariableBySemantic("UP").AsVector().Set(Vector3.UnitY);
     effect.GetVariableBySemantic("EYE")
         .AsVector()
         .Set(game.RenderContext.CurrentTargetContext.MatrixManager.ViewMatrixManager.CameraPosition);
     effect.GetVariableBySemantic("UVOFFSET").AsScalar().Set(uvOffset);
     effect.GetVariableBySemantic("LAZERHEIGHT").AsScalar().Set(40*(1-(float)Math.Exp(-lastTime/500d)));//レーザーの幅
 }
Example #2
0
        private void SubscribeLazerEffectVariable(PlaneBoard planeBoard, Effect effect, ShaderResourceView arg3)
        {
            planeBoard.DefaultEffectSubscribe();
            int uvOffset = (int)(lastTime / 100f) % 8;

            effect.GetVariableBySemantic("TIME").AsScalar().Set(lastTime / 100f);
            effect.GetVariableBySemantic("DIRECTION").AsVector().Set(Vector3.UnitZ);
            effect.GetVariableBySemantic("LENGTH").AsScalar().Set(200);//長さ
            effect.GetVariableBySemantic("UP").AsVector().Set(Vector3.UnitY);
            effect.GetVariableBySemantic("EYE")
            .AsVector()
            .Set(game.RenderContext.CurrentTargetContext.MatrixManager.ViewMatrixManager.CameraPosition);
            effect.GetVariableBySemantic("UVOFFSET").AsScalar().Set(uvOffset);
            effect.GetVariableBySemantic("LAZERHEIGHT").AsScalar().Set(40 * (1 - (float)Math.Exp(-lastTime / 500d)));//レーザーの幅
        }
Example #3
0
 /// <summary>
 /// Renderbeams the specified arg1.
 /// </summary>
 /// <param name="arg1">The arg1.</param>
 /// <param name="arg2">The arg2.</param>
 /// <param name="arg3">The arg3.</param>
 private void Renderbeam(PlaneBoard arg1, SlimDX.Direct3D11.Effect arg2, ShaderResourceView arg3)
 {
     arg1.DefaultEffectSubscribe();
     beffect.GetVariableBySemantic("NOISETEX").AsResource().SetResource(beamView);
     beffect.GetVariableBySemantic("TIME").AsScalar().Set(lastTime - 1f);
     beffect.GetVariableBySemantic("STARTPOS").AsVector().Set(_startPosition);
     beffect.GetVariableBySemantic("TARGETPOS").AsVector().Set(-new Vector3(0, 0, 300));
     beffect.GetVariableBySemantic("UP").AsVector().Set(Vector3.TransformNormal(Vector3.UnitY * 100, Matrix.RotationZ((float)(2 * Math.PI / beamEffects.Length * currentBeamIndex))));
     beffect.GetVariableBySemantic("EYE").AsVector().Set(_context.RenderContext.CurrentTargetContext.MatrixManager.ViewMatrixManager.CameraPosition);
     beffect.GetVariableBySemantic("UVOFFSET").AsScalar().Set((float)(0.2 * currentBeamIndex));
     beffect.GetVariableBySemantic("BH").AsScalar().Set(5);
     currentBeamIndex++;
     if (currentBeamIndex == 5)
     {
         currentBeamIndex = 0;
     }
 }
Example #4
0
 private void RenderFront(PlaneBoard arg1, SlimDX.Direct3D11.Effect arg2, ShaderResourceView arg3)
 {
     arg1.DefaultEffectSubscribe();
     effect.GetVariableBySemantic("NOISETEX").AsResource().SetResource(noiseView);
     effect.GetVariableBySemantic("TIME").AsScalar().Set(lastTime);
 }
Example #5
0
 /// <summary>
 /// Renderbeams the specified arg1.
 /// </summary>
 /// <param name="arg1">The arg1.</param>
 /// <param name="arg2">The arg2.</param>
 /// <param name="arg3">The arg3.</param>
 private void Renderbeam(PlaneBoard arg1, SlimDX.Direct3D11.Effect arg2, ShaderResourceView arg3)
 {
     arg1.DefaultEffectSubscribe();
     beffect.GetVariableBySemantic("NOISETEX").AsResource().SetResource(beamView);
     beffect.GetVariableBySemantic("TIME").AsScalar().Set(lastTime-1f);
     beffect.GetVariableBySemantic("STARTPOS").AsVector().Set(_startPosition);
     beffect.GetVariableBySemantic("TARGETPOS").AsVector().Set(-new Vector3(0,0,300));
     beffect.GetVariableBySemantic("UP").AsVector().Set(Vector3.TransformNormal(Vector3.UnitY*100,Matrix.RotationZ((float) (2*Math.PI/beamEffects.Length*currentBeamIndex))));
     beffect.GetVariableBySemantic("EYE").AsVector().Set(_context.RenderContext.CurrentTargetContext.MatrixManager.ViewMatrixManager.CameraPosition);
     beffect.GetVariableBySemantic("UVOFFSET").AsScalar().Set((float) (0.2*currentBeamIndex));
     beffect.GetVariableBySemantic("BH").AsScalar().Set(5);
     currentBeamIndex++;
     if (currentBeamIndex == 5) currentBeamIndex = 0;
 }
Example #6
0
 private void RenderFront(PlaneBoard arg1, SlimDX.Direct3D11.Effect arg2, ShaderResourceView arg3)
 {
     arg1.DefaultEffectSubscribe();
     effect.GetVariableBySemantic("NOISETEX").AsResource().SetResource(noiseView);
     effect.GetVariableBySemantic("TIME").AsScalar().Set(lastTime);
 }