Fix particle sizes, and add tools for comparing renderers
Particles: Direct3D 9's size limit evidently isn't the documented 64 pixels; unclamped (up to 2048) they match the client's renderer. A compare view shows the left half's scene over the right half, both renderers side by side; %TEMP%\t5de-renderer-view.txt switches views and %TEMP%\t5de-renderer-shaders\fixed_function.hlsl replaces the shaders while the client runs. The renderer process runs from a copy, so the program can be replaced meanwhile. The adapter recognizes only the textures and buffers it made (others reach the client renderer unchanged) and logs the others and render targets. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
1a45bf9a86
commit
299cd8c312
11 files changed
+239
-28
No files matched your search
+11
-7
@@ -62,30 +62,34 @@ private:
|
||||
std::uint32_t id_;
|
||||
};
|
||||
|
||||
// The client renderer's object and our id for something the engine made; null and 0 for null.
|
||||
// Whether an object is one of ours (live Texture, IndexBuffer or VertexBuffer): the client can also hand the engine
|
||||
// objects the client renderer made itself (render targets' textures), which must reach it unchanged.
|
||||
bool ours(const void* object);
|
||||
|
||||
// The client renderer's object, and our id, for what the client passes in: ours unwrapped, others unchanged (id 0).
|
||||
inline imvu::PiRenderTexture* inner(imvu::PiRenderTexture* texture)
|
||||
{
|
||||
return texture != nullptr ? static_cast<Texture*>(texture)->inner() : nullptr;
|
||||
return ours(texture) ? static_cast<Texture*>(texture)->inner() : texture;
|
||||
}
|
||||
inline std::uint32_t id(imvu::PiRenderTexture* texture)
|
||||
{
|
||||
return texture != nullptr ? static_cast<Texture*>(texture)->id() : 0;
|
||||
return ours(texture) ? static_cast<Texture*>(texture)->id() : 0;
|
||||
}
|
||||
inline imvu::PiInternalIndexBuffer* inner(imvu::PiInternalIndexBuffer* buffer)
|
||||
{
|
||||
return buffer != nullptr ? static_cast<IndexBuffer*>(buffer)->inner() : nullptr;
|
||||
return ours(buffer) ? static_cast<IndexBuffer*>(buffer)->inner() : buffer;
|
||||
}
|
||||
inline std::uint32_t id(imvu::PiInternalIndexBuffer* buffer)
|
||||
{
|
||||
return buffer != nullptr ? static_cast<IndexBuffer*>(buffer)->id() : 0;
|
||||
return ours(buffer) ? static_cast<IndexBuffer*>(buffer)->id() : 0;
|
||||
}
|
||||
inline imvu::PiInternalVertexBuffer* inner(imvu::PiInternalVertexBuffer* buffer)
|
||||
{
|
||||
return buffer != nullptr ? static_cast<VertexBuffer*>(buffer)->inner() : nullptr;
|
||||
return ours(buffer) ? static_cast<VertexBuffer*>(buffer)->inner() : buffer;
|
||||
}
|
||||
inline std::uint32_t id(imvu::PiInternalVertexBuffer* buffer)
|
||||
{
|
||||
return buffer != nullptr ? static_cast<VertexBuffer*>(buffer)->id() : 0;
|
||||
return ours(buffer) ? static_cast<VertexBuffer*>(buffer)->id() : 0;
|
||||
}
|
||||
|
||||
} // namespace t5de
|
||||
Reference in new issue
Block a user