Легенда
Регистрация: 14.10.2007
Сообщений: 3,878
Написано 2,012 полезных сообщений (для 5,072 пользователей)
|
Ответ: сливаеца цвет модели
cubeface=LoadTexture("data\cars\glassesspheremap.p ng",12
SetCubeFace cubeface,0
EntityTexture t\gtr_mesh,cubeface
SetCubeFace cubeface,1
EntityTexture t\gtr_mesh,cubeface
SetCubeFace cubeface,2
EntityTexture t\gtr_mesh,cubeface
SetCubeFace cubeface,3
EntityTexture t\gtr_mesh,cubeface
SetCubeFace cubeface,4
EntityTexture t\gtr_mesh,cubeface
SetCubeFace cubeface,5
EntityTexture t\gtr_mesh,cubeface
|
Пример использования кубмапы для динамических отражений.
Function Texture(Resolution,Mesh,layer,blend)
VP\Texture=CreateTexture(Resolution,Resolution,128)
TextureBlend VP\Texture,blend
PositionEntity FxCam,EntityX#(Mesh,1),EntityY#(Mesh,1),EntityZ#(Mesh,1)
CameraViewport FxCam,0,0,Resolution,Resolution
ShowEntity FxCam
SetCubeFace VP\Texture,0
RotateEntity FxCam,0,90,0
RenderWorld
CopyRect 0,0,Resolution,Resolution,0,0,BackBuffer(),TextureBuffer(VP\Texture)
SetCubeFace VP\Texture,1
RotateEntity FxCam,0,0,0
RenderWorld
CopyRect 0,0,Resolution,Resolution,0,0,BackBuffer(),TextureBuffer(VP\Texture)
SetCubeFace VP\Texture,2
RotateEntity FxCam,0,-90,0
RenderWorld
CopyRect 0,0,Resolution,Resolution,0,0,BackBuffer(),TextureBuffer(VP\Texture)
SetCubeFace VP\Texture,3
RotateEntity FxCam,0,180,0
RenderWorld
CopyRect 0,0,Resolution,Resolution,0,0,BackBuffer(),TextureBuffer(VP\Texture)
SetCubeFace VP\Texture,4
RotateEntity FxCam,-90,0,0
RenderWorld
CopyRect 0,0,Resolution,Resolution,0,0,BackBuffer(),TextureBuffer(VP\Texture)
SetCubeFace VP\Texture,5
RotateEntity FxCam,90,0,0
RenderWorld
CopyRect 0,0,Resolution,Resolution,0,0,BackBuffer(),TextureBuffer(VP\Texture)
EntityTexture Mesh,VP\Texture,0,layer
End Function
Меняй слой и бленд. Если кубмап статичный то можно вообще в максе наложить.
З.Ы. Наспех выдрал. Забыл убрать типы.
__________________
Ибо как сказал Бгдн:
|