0
. CODEeax, eax @ FOFFSET Z_psSunEERError_Message
@@: dxbuf GetBufferPointer, a_psSunb_psSun, eaxdev9 CreatePixelShader, pd3dDevice, b_psSun, addr c_psSun
. DATA_psSunEER db Create error C_psSun , 0
. CODEeax, eax @ FOFFSET C_psSunEERError_Message
@@:
. DATA_psWater db shaders psWater. inc raquo ;, 0
. DATA? _psWater LPD3DXBUFFER? _psWater Dd? _psWater LPDIRECT3DVERTEXSHADER9?
. CODED3DXAssembleShaderFromFileA, addr f_psWater, 0, 0, D3DXSHADER_DEBUG, addr a_psWater, 0
. DATA_psWaterEER db Create error Z_psWater , 0
. CODEeax, eax @ FOFFSET Z_psWaterEERError_Message
@@: dxbuf GetBufferPointer, a_psWaterb_psWater, eaxdev9 CreatePixelShader, pd3dDevice, b_psWater, addr c_psWater
. DATA_psWaterEER db Create error C_psWater , 0
. CODEeax, eax @ FOFFSET C_psWaterEERError_Message
@@:
. DATA_psZemla db shaders psZemla. inc raquo ;, 0
. DATA? _psZemla LPD3DXBUFFER? _psZemla Dd? _psZemla LPDIRECT3DVERTEXSHADER9?
. CODED3DXAssembleShaderFromFileA, addr f_psZemla, 0, 0, D3DXSHADER_DEBUG, addr a_psZemla, 0
. DATA_psZemlaEER db Create error Z_psZemla , 0
. CODEeax, eax @ FOFFSET Z_psZemlaEERError_Message
@@: dxbuf GetBufferPointer, a_psZemlab_psZemla, eaxdev9 CreatePixelShader, pd3dDevice, b_psZemla, addr c_psZemla
. DATA_psZemlaEER db Create error C_psZemla , 0
. CODEeax, eax @ FOFFSET C_psZemlaEER
jmp Error_Message
@@: _ Scene endp
; :::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::: _ Render_Parameters procdev9 SetRenderState, pd3dDevice, D3DRS_CULLMODE, D3DCULL_NONEdev9 SetRenderState, pd3dDevice, D3DRS_ZENABLE, D3DZB_TRUEdev9 SetSamplerState, pd3dDevice , 0, D3DSAMP_MIPFILTER, D3DTEXF_ANISOTROPIC
d3dev9 SetSamplerState, pd3dDevice, 0, D3DSAMP_MAGFILTER, 0dev9 SetSamplerState, pd3dDevice, 0, D3DSAMP_MINFILTER, 0dev9 SetSamplerState, pd3dDevice, 1, D3DSAMP_MIPFILTER, D3DTEXF_ANISOTROPICdev9 SetSamplerState, pd3dDevice, 1, D3DSAMP_MAGFILTER, D3DTEXF_ANISOTROPICdev9 SetSamplerState, pd3dDevice, 1, D3DSAMP_MINFILTER, D3DTEXF_ANISOTROPIC_Render_Parameters endp
; :::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::: _ Scene proc
. DATAdd 1.0f; Значення для очищення Z буфера
Clearcolor dd 0; Колір для очищення BackBuffer'а
. DATA?
. CODEdev9 TestCooperativeLevel, pd3dDevice; Перевірка кооперації
cmp eax, D3DERR_DEVICELOST; Якщо пристрій втрачено то вихід
jne noreset; Destroy_Direct3DExit;
noreset:; eax, D3DERR_DEVICENOTRESET; Якщо пристрій не втрачено і не скинуто то скидаємо
jne noreset2; dev9 Reset, pd3dDevice, ADDR BackBufferWidth;
invoke Set_Render_Parameters: dev9 BeginScene, pd3dDevice
; підготовка даннихdev9 SetRenderTarget, pd3dDevice, 0, CartoonRenP; установка рендер Таргет
d3dev9 SetRenderTarget, pd3dDevice, 1, NormalRenPdev9 SetDepthStencilSurface, pd3dDevice, DepthTargPdev9 Clear, pd3dDevice, 0, NULL, D3DCLEAR_TARGET or D3DCLEAR_ZBUFFER, Clearcolor, Zvalue, 0; Очищення BackBuffer'а і Z-буфераD3DXMatrixMultiply, ADDR m_VS1, ADDR WorldMatrix, ADDR ViewMatrixD3DXMatrixMultiply, ADDR m_VS1, ADDR m_VS1, ADDR ProjectionMatrixD3DXMatrixTranspose, ADDR m_VS1, ADDR m_VS1dev9 SetTexture, pd3dDevice, 0, tefectP
; Отрісовка земліdev9 SetVertexShader, pd3dDevice, c_vsZemladev9 SetPixelShader, pd3dDevice, c_psZemladev9 SetVertexShaderConstantF, pd3dDevice, 0, addr m_VS1, 4; c0dev9 SetVertexShaderConstantF, pd3dDevice, 4, addr PosLight, 1; c4dev9 SetFVF, pd3dDevice, zemlaPTdev9 SetStreamSource, pd3dDevice, 0, zemlaP_VB, 0, zemlaPBdev9 SetIndices, pd3dDevice, zemlaP_IBdev9 DrawIndexedPrimitive, pd3dDevice, D3DPT_TRIANGLELIST, 0,0, zemlaP_NV, 0, zemlaP_NF
; Отрісовка солнцаdev9 SetVertexShader, pd3dDevice, c_vsSundev9 SetPixelShader, pd3dDevice, c_psSundev9 SetFVF, pd3dDevice, neboPTdev9 SetStreamSource, pd3dDevice, 0, neboP_VB, 0, neboPBdev9 SetIndices, pd3dDevice, neboP_IBdev9 DrawIndexedPrimitive, pd3dDevice, D3DPT_TRIANGLELIST, 0,0, neboP_NV, 0, neboP_NF
; Отрісовка камняdev9 SetVertexShader, pd3dDevice, c_vsKamendev9 SetPixelShader, pd3dDevice, c_psKamendev9 SetFVF, pd3dDevice, kamenPTdev9 SetStreamSource, pd3dDevice, 0, kamenP_VB, 0, kamenPBdev9 SetIndices, pd3dDevice, kamenP_IBdev9 DrawIndexedPrimitive, pd3dDevice, D3DPT_TRIANGLELIST, 0,0, kamenP_NV, 0, kamenP_NF
; Отрісовка пальмdev9 SetPixelShader, pd3dDevice, c_psPalmadev9 SetFVF, pd3dDevice, palmiPTdev9 SetStreamSource, pd3dDevice, 0, palmiP_VB, 0, palmiPBdev9 SetIndices, pd3dDevice, palmiP_IBdev9 DrawIndexedPrimitive, pd3dDevice, D3DPT_TRIANGLELIST, 0,0, palmiP_NV, 0, palmiP_NF
; Отрісовка небаdev9 SetRenderTarget, pd3dDevice, 1,0dev9 SetVertexShader, pd3dDevice, c_vsNebo...