|
| 1 | +WorldContent0 = "sectors" |
| 2 | +WorldContent1 = "drawables" |
| 3 | +EnableZprepass = false |
| 4 | +StencilClearFlag = false |
| 5 | +MSAAType = "2x" |
| 6 | +function RenderMainForSingle(_ARG_0_, _ARG_1_, _ARG_2_) |
| 7 | + --if GetPlatform() == "xbox360" and MSAAType ~= "1x" then |
| 8 | + --CreateTexture(_ARG_0_, "framebuffer_hdr", GetSurfaceWidth(_ARG_0_, _ARG_1_), GetSurfaceHeight(_ARG_0_, _ARG_1_), 1, "HDR") |
| 9 | + --CreateTexture(_ARG_0_, _ARG_2_ .. "_texture", GetSurfaceWidth(_ARG_0_, _ARG_1_), GetSurfaceHeight(_ARG_0_, _ARG_1_), 1, GetDepthStencilFormat(_ARG_0_)) |
| 10 | + --end |
| 11 | + SetCurrentCamera(_ARG_0_, "main") |
| 12 | + AutoSetAspect(_ARG_0_) |
| 13 | + if GetPlatform() == "xbox360" then |
| 14 | + --if ZpassFlag and MSAAType == "1x" then |
| 15 | + --else |
| 16 | + --end |
| 17 | + SetAutoZPass(_ARG_0_, EnableZprepass) |
| 18 | + --SetFrameBufferObject(_ARG_0_, "framebuffer_hdr", _ARG_2_ .. "_texture", "all", 0, 0, 0, 0, MSAAType) |
| 19 | + SetFrameBufferObject(_ARG_0_, _ARG_1_, _ARG_2_, "all", 0, 0, 0, 0) |
| 20 | + else |
| 21 | + if ZpassFlag then |
| 22 | + elseif StencilClearFlag then |
| 23 | + else |
| 24 | + end |
| 25 | + SetFrameBufferObject(_ARG_0_, _ARG_1_, _ARG_2_, "color_depth", 0, 0, 0, 0) |
| 26 | + end |
| 27 | + SetZMode(_ARG_0_, "lessequalon") |
| 28 | + LockZMode(_ARG_0_, "true") |
| 29 | + SetBlendMode(_ARG_0_, "opaque") |
| 30 | + LockBlendMode(_ARG_0_, "true") |
| 31 | + RenderWorld(_ARG_0_, "main", WorldContent0, "opaque") |
| 32 | + RenderWorld(_ARG_0_, "main", WorldContent1, "opaque") |
| 33 | + RenderWorld(_ARG_0_, "main", WorldContent0, "punchthrough") |
| 34 | + RenderWorld(_ARG_0_, "main", WorldContent1, "punchthrough") |
| 35 | + LockZMode(_ARG_0_, "false") |
| 36 | + LockBlendMode(_ARG_0_, "false") |
| 37 | + SetZMode(_ARG_0_, "lessequaloff") |
| 38 | + LockZMode(_ARG_0_, "true") |
| 39 | + SetCurrentCamera(_ARG_0_, "mainsky") |
| 40 | + AutoSetAspect(_ARG_0_) |
| 41 | + RenderWorld(_ARG_0_, "sky") |
| 42 | + SetCurrentCamera(_ARG_0_, "mainpsi") |
| 43 | + AutoSetAspect(_ARG_0_) |
| 44 | + SetBlendMode(_ARG_0_, "add") |
| 45 | + LockBlendMode(_ARG_0_, "true") |
| 46 | + SetConstantShader(_ARG_0_, "psi", "psi_effect", "DefaultTechnique") |
| 47 | + RenderWorld(_ARG_0_, "psi") |
| 48 | + SetConstantShader(_ARG_0_, "psi", "null") |
| 49 | + LockBlendMode(_ARG_0_, "false") |
| 50 | + LockZMode(_ARG_0_, "false") |
| 51 | + SetCurrentCamera(_ARG_0_, "mainxp") |
| 52 | + AutoSetAspect(_ARG_0_) |
| 53 | + RenderWorld(_ARG_0_, "transparent", "sectors") |
| 54 | + SetCurrentCamera(_ARG_0_, "main") |
| 55 | + AutoSetAspect(_ARG_0_) |
| 56 | + RenderWorld(_ARG_0_, "main", "all", "transparent") |
| 57 | + if GetPlatform() == "xbox360" then |
| 58 | + SetAutoZPass(_ARG_0_, false) |
| 59 | + if MSAAType ~= "1x" then |
| 60 | + --Resolve(_ARG_0_, "null", _ARG_2_ .. "_texture") |
| 61 | + --SetFrameBufferObject(_ARG_0_, "framebuffer_hdr", _ARG_2_ .. "_texture", "none", 0, 0, 0, 0)--, "1x", "not_resolved") |
| 62 | + --if StencilClearFlag then |
| 63 | + --end |
| 64 | + SetFrameBufferObject(_ARG_0_, _ARG_1_, _ARG_2_, "stencil", 0, 0, 0, 0) |
| 65 | + elseif EnableZprepass then |
| 66 | + SetFrameBufferObject(_ARG_0_, _ARG_1_, _ARG_2_, "none", 0, 0, 0, 0)--, "not_restored") |
| 67 | + end |
| 68 | + end |
| 69 | + if GetRegistry(_ARG_0_, "NotUseParticle") == false then |
| 70 | + RenderSpanverse(_ARG_0_) |
| 71 | + RenderGE1Particle(_ARG_0_, 1) |
| 72 | + RenderGE1Particle(_ARG_0_, 2) |
| 73 | + RenderGE1Particle(_ARG_0_, 3) |
| 74 | + end |
| 75 | + SetCurrentCamera(_ARG_0_, "mainxp") |
| 76 | + AutoSetAspect(_ARG_0_) |
| 77 | + RenderWorld(_ARG_0_, "transparent", "drawables") |
| 78 | + BeginBlock(_ARG_0_, "capture0", "stop") |
| 79 | + if GetPlatform() == "xbox360" then |
| 80 | + Resolve(_ARG_0_, "framebuffer_tile") |
| 81 | + else |
| 82 | + Capture(_ARG_0_, _ARG_1_, 1) |
| 83 | + end |
| 84 | + BeginBlock(_ARG_0_, "oc", "stop") |
| 85 | + SetCurrentCamera(_ARG_0_, "mainoc") |
| 86 | + AutoSetAspect(_ARG_0_) |
| 87 | + SetZMode(_ARG_0_, "lessequalon") |
| 88 | + SetBlendMode(_ARG_0_, "opaque") |
| 89 | + LockZMode(_ARG_0_, "true") |
| 90 | + LockBlendMode(_ARG_0_, "true") |
| 91 | + SetTexture(_ARG_0_, 0, "enemy/common/en_ocnoise.dds", "wrap", "wrap", "linear") |
| 92 | + SetConstantShader(_ARG_0_, "oc", "OpticalCamouflage", "OpticalCamouflage") |
| 93 | + RenderWorld(_ARG_0_, "oc", "all", "all", "depth") |
| 94 | + SetConstantShader(_ARG_0_, "oc", "null") |
| 95 | + LockZMode(_ARG_0_, "false") |
| 96 | + LockBlendMode(_ARG_0_, "false") |
| 97 | + EndBlock(_ARG_0_) |
| 98 | + if GetRegistry(_ARG_0_, "NotUseParticle") == false then |
| 99 | + RenderGE1Particle(_ARG_0_, 1) |
| 100 | + RenderGE1Particle(_ARG_0_, 2) |
| 101 | + RenderGE1Particle(_ARG_0_, 3) |
| 102 | + RenderGE1Particle(_ARG_0_, 4) |
| 103 | + RenderGE1Particle(_ARG_0_, 5) |
| 104 | + end |
| 105 | + EndBlock(_ARG_0_) |
| 106 | +end |
| 107 | +function RenderMainForMulti(_ARG_0_, _ARG_1_, _ARG_2_) |
| 108 | + SetCurrentCamera(_ARG_0_, "main") |
| 109 | + AutoSetAspect(_ARG_0_) |
| 110 | + if GetPlatform() == "xbox360" then |
| 111 | + SetFrameBufferObject(_ARG_0_, _ARG_1_, _ARG_2_, "all", 0, 0, 0, 0) |
| 112 | + SetZMode(_ARG_0_, "lessequalon") |
| 113 | + elseif GetPlatform() == "ps3" then |
| 114 | + SetFrameBufferObject(_ARG_0_, _ARG_1_, _ARG_2_, "color_depth", 0, 0, 0, 0) |
| 115 | + SetZMode(_ARG_0_, "lessequalon") |
| 116 | + else |
| 117 | + SetFrameBufferObject(_ARG_0_, _ARG_1_, _ARG_2_, "all", 0, 0, 0, 0) |
| 118 | + SetZMode(_ARG_0_, "lessequalon") |
| 119 | + end |
| 120 | + LockZMode(_ARG_0_, "true") |
| 121 | + SetBlendMode(_ARG_0_, "opaque") |
| 122 | + LockBlendMode(_ARG_0_, "true") |
| 123 | + RenderWorld(_ARG_0_, "main", "all", "opaque") |
| 124 | + RenderWorld(_ARG_0_, "main", "all", "punchthrough") |
| 125 | + LockZMode(_ARG_0_, "false") |
| 126 | + LockBlendMode(_ARG_0_, "false") |
| 127 | + SetZMode(_ARG_0_, "lessequaloff") |
| 128 | + LockZMode(_ARG_0_, "true") |
| 129 | + SetCurrentCamera(_ARG_0_, "mainsky") |
| 130 | + AutoSetAspect(_ARG_0_) |
| 131 | + RenderWorld(_ARG_0_, "sky") |
| 132 | + SetCurrentCamera(_ARG_0_, "mainpsi") |
| 133 | + AutoSetAspect(_ARG_0_) |
| 134 | + SetBlendMode(_ARG_0_, "add") |
| 135 | + LockBlendMode(_ARG_0_, "true") |
| 136 | + SetConstantShader(_ARG_0_, "psi", "psi_effect", "DefaultTechnique") |
| 137 | + RenderWorld(_ARG_0_, "psi") |
| 138 | + SetConstantShader(_ARG_0_, "psi", "null") |
| 139 | + LockBlendMode(_ARG_0_, "false") |
| 140 | + LockZMode(_ARG_0_, "false") |
| 141 | + SetCurrentCamera(_ARG_0_, "mainxp") |
| 142 | + AutoSetAspect(_ARG_0_) |
| 143 | + RenderWorld(_ARG_0_, "transparent") |
| 144 | + SetCurrentCamera(_ARG_0_, "main") |
| 145 | + AutoSetAspect(_ARG_0_) |
| 146 | + RenderWorld(_ARG_0_, "main", "all", "transparent") |
| 147 | + if GetRegistry(_ARG_0_, "NotUseParticle") == false then |
| 148 | + RenderSpanverse(_ARG_0_) |
| 149 | + RenderGE1Particle(_ARG_0_, 1) |
| 150 | + RenderGE1Particle(_ARG_0_, 2) |
| 151 | + RenderGE1Particle(_ARG_0_, 3) |
| 152 | + RenderGE1Particle(_ARG_0_, 4) |
| 153 | + RenderGE1Particle(_ARG_0_, 5) |
| 154 | + end |
| 155 | +end |
0 commit comments