Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
shd8bumpdiff.h
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19 /***********************************************************************************************
20 *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
21 ***********************************************************************************************
22 * *
23 * Project Name : WWSHADE *
24 * *
25 * $Archive:: /Commando/Code/ww3d2/shd8bumpdiff.h $*
26 * *
27 * $Author:: Kenny_m
28 *
29 * $Modtime:: 07/08/02 3:39p $*
30 * *
31 * $Revision:: 1 $*
32 * *
33 *---------------------------------------------------------------------------------------------*
34 * Functions: *
35 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
36
37#ifndef SHD8BUMPDIFF_H
38#define SHD8BUMPDIFF_H
39
40#ifndef SHDINTERFACE_H
41#include "shdinterface.h"
42#endif
43
44#ifndef SHDHWSHADER_H
45#include "shdhwshader.h"
46#endif
47
49{
50public:
52 virtual ~Shd8BumpDiffClass();
53
54 static void Init();
55 static void Shutdown();
56
57 virtual int Get_Pass_Count() { return 2; }
58 virtual bool Pass_Selection(ShdMeshClass*, RenderInfoClass*,int);
59
60 virtual int Get_Texture_Count() const { return 2; }
61 virtual TextureClass* Peek_Texture(int idx) const { return idx==0 ? Texture : NormalMap; }
62
63 virtual void Apply_Shared(int cur_pass, RenderInfoClass& rinfo);
64 virtual void Apply_Instance(int cur_pass, RenderInfoClass& rinfo);
65
66 virtual unsigned Get_Vertex_Stream_Count() const;
67 virtual unsigned Get_Vertex_Size(unsigned stream) const;
68 virtual bool Use_HW_Vertex_Processing() const { return Vertex_Shader.Is_Using_Hardware(); }
69 virtual void Copy_Vertex_Stream
70 (
71 unsigned stream,
72 void* dest_buffer,
73 const VertexStreamStruct& vss,
74 unsigned vertex_count
75 );
76
77protected:
78
80
83
85
88
92
93 // self shadowing
97};
98
99#endif // SHD8BUMPDIFF_H
virtual void Apply_Instance(int cur_pass, RenderInfoClass &rinfo)
virtual ~Shd8BumpDiffClass()
static Matrix4x4 View_Projection_Matrix
virtual int Get_Pass_Count()
virtual bool Use_HW_Vertex_Processing() const
virtual void Apply_Shared(int cur_pass, RenderInfoClass &rinfo)
static ShdHWPixelShader Pixel_Shader
static void Shutdown()
virtual TextureClass * Peek_Texture(int idx) const
TextureClass * NormalMap
virtual unsigned Get_Vertex_Stream_Count() const
static ShdHWPixelShader Self_Shadow_Pixel_Shader
void Setup_Self_Shadow_Info(ShdMeshClass &mesh, RenderInfoClass &rinfo)
static ShdHWVertexShader Vertex_Shader
TextureClass * Texture
Shd8BumpDiffClass(const ShdDefClass *def)
static void Init()
static ShdHWVertexShader Self_Shadow_Vertex_Shader
virtual unsigned Get_Vertex_Size(unsigned stream) const
Matrix4x4 Self_Shadow_Transform
virtual void Copy_Vertex_Stream(unsigned stream, void *dest_buffer, const VertexStreamStruct &vss, unsigned vertex_count)
virtual int Get_Texture_Count() const
virtual bool Pass_Selection(ShdMeshClass *, RenderInfoClass *, int)
ShdInterfaceClass(const ShdDefClass *def, int class_id)
Constructor.