Skip to content

Commit 567cbd9

Browse files
GLTF_PBR_Renderer: added ResourceCacheUseInfo::SetAtlasFormats method
1 parent d9a75a7 commit 567cbd9

File tree

1 file changed

+36
-16
lines changed

1 file changed

+36
-16
lines changed

PBR/interface/GLTF_PBR_Renderer.hpp

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -169,53 +169,73 @@ class GLTF_PBR_Renderer : public PBR_Renderer
169169
/// Vertex layout key.
170170
GLTF::ResourceManager::VertexLayoutKey VtxLayoutKey;
171171

172-
/// Base color texture format.
172+
/// Base color texture atlas format.
173173
TEXTURE_FORMAT BaseColorFormat = TEX_FORMAT_RGBA8_UNORM;
174174

175-
/// Base color texture format for alpha-cut and alpha-blend materials.
175+
/// Base color texture atlas format for alpha-cut and alpha-blend materials.
176176
TEXTURE_FORMAT BaseColorAlphaFormat = TEX_FORMAT_RGBA8_UNORM;
177177

178-
/// Physical descriptor texture format.
178+
/// Physical descriptor texture atlas format.
179179
TEXTURE_FORMAT PhysicalDescFormat = TEX_FORMAT_RGBA8_UNORM;
180180

181-
/// Normal map format.
181+
/// Normal map atlas format.
182182
TEXTURE_FORMAT NormalFormat = TEX_FORMAT_RGBA8_UNORM;
183183

184-
/// Occlusion texture format.
184+
/// Occlusion texture atlas format.
185185
TEXTURE_FORMAT OcclusionFormat = TEX_FORMAT_RGBA8_UNORM;
186186

187-
/// Emissive texture format.
187+
/// Emissive texture atlas format.
188188
TEXTURE_FORMAT EmissiveFormat = TEX_FORMAT_RGBA8_UNORM;
189189

190-
/// Clear coat texture format.
190+
/// Clear coat texture atlas format.
191191
TEXTURE_FORMAT ClearCoatFormat = TEX_FORMAT_RGBA8_UNORM;
192192

193-
/// Clear coat roughness texture format.
193+
/// Clear coat roughness texture atlas format.
194194
TEXTURE_FORMAT ClearCoatRoughnessFormat = TEX_FORMAT_RGBA8_UNORM;
195195

196-
/// Clear coat normal texture format.
196+
/// Clear coat normal texture atlas format.
197197
TEXTURE_FORMAT ClearCoatNormalFormat = TEX_FORMAT_RGBA8_UNORM;
198198

199-
/// Sheen color texture format.
199+
/// Sheen color texture atlas format.
200200
TEXTURE_FORMAT SheenColorFormat = TEX_FORMAT_RGBA8_UNORM;
201201

202-
/// Sheen roughness texture format.
202+
/// Sheen roughness texture atlas format.
203203
TEXTURE_FORMAT SheenRoughnessFormat = TEX_FORMAT_RGBA8_UNORM;
204204

205-
/// Anisotropy texture format.
205+
/// Anisotropy texture atlas format.
206206
TEXTURE_FORMAT AnisotropyFormat = TEX_FORMAT_RGBA8_UNORM;
207207

208-
/// Iridescence texture format.
208+
/// Iridescence texture atlas format.
209209
TEXTURE_FORMAT IridescenceFormat = TEX_FORMAT_RGBA8_UNORM;
210210

211-
/// Iridescence thickness texture format.
211+
/// Iridescence thickness texture atlas format.
212212
TEXTURE_FORMAT IridescenceThicknessFormat = TEX_FORMAT_RGBA8_UNORM;
213213

214-
/// Transmission texture format.
214+
/// Transmission texture atlas format.
215215
TEXTURE_FORMAT TransmissionFormat = TEX_FORMAT_RGBA8_UNORM;
216216

217-
/// Thickness texture format.
217+
/// Thickness texture atlas format.
218218
TEXTURE_FORMAT ThicknessFormat = TEX_FORMAT_RGBA8_UNORM;
219+
220+
void SetAtlasFormats(TEXTURE_FORMAT Format)
221+
{
222+
BaseColorFormat = Format;
223+
BaseColorAlphaFormat = Format;
224+
PhysicalDescFormat = Format;
225+
NormalFormat = Format;
226+
OcclusionFormat = Format;
227+
EmissiveFormat = Format;
228+
ClearCoatFormat = Format;
229+
ClearCoatRoughnessFormat = Format;
230+
ClearCoatNormalFormat = Format;
231+
SheenColorFormat = Format;
232+
SheenRoughnessFormat = Format;
233+
AnisotropyFormat = Format;
234+
IridescenceFormat = Format;
235+
IridescenceThicknessFormat = Format;
236+
TransmissionFormat = Format;
237+
ThicknessFormat = Format;
238+
}
219239
};
220240

221241
/// Creates a shader resource binding for a GTLF resource cache.

0 commit comments

Comments
 (0)