载入中...
搜索中...
未找到
Graphics.cpp
浏览该文件的文档.
113Mesh* newMeshFromArraysScript(Graphics* gfx, ssq::Array posArr, ssq::Array nrmArr, ssq::Array uvArr, int vertexCount,
121 return gfx->newMeshFromArrays(pos.data(), nrm.empty() ? nullptr : nrm.data(), uv.empty() ? nullptr : uv.data(),
125bool updateMeshVerticesScript(Graphics* gfx, Mesh* mesh, ssq::Array posArr, ssq::Array nrmArr, ssq::Array uvArr,
152void setMesh3DCameraPosScript(Graphics* gfx, float x, float y, float z) { gfx->setMesh3DCameraPos(glm::vec3(x, y, z)); }
173 : rayTracing_(eve::cap::ProviderRef<IRayTracing>::bind()), frameCaptures_(std::make_unique<FrameCaptureStore>()) {
223 RenderSystem3D::renderToCanvas(*this, canvas, camera, 0xffffffffu, 1.f, true, true, nullptr, nullptr, 1.f, true);
237 const bool doAA = !renderControl_ || renderControl_->isEnabled("aa") || renderControl_->isEnabled("taa");
240 const std::string requested = renderControl_ ? renderControl_->getPostProcessQuality() : "high";
254void Graphics::drawScene3DRGBA(float x, float y, float w, float h, float r, float g, float b, float a) {
300 "DepthOfField", std::function<DepthOfField*()>([]() -> DepthOfField* { return nullptr; }), true);
324 table.addClass<MapFog>("MapFog", std::function<MapFog*()>([]() -> MapFog* { return nullptr; }), true);
353 table.addClass<Texture>("Texture", std::function<Texture*()>([]() -> Texture* { return nullptr; }), true);
367 auto quad = table.addClass<Quad>("Quad", std::function<Quad*()>([]() -> Quad* { return nullptr; }), true);
374 auto shader = table.addClass<Shader>("Shader", std::function<Shader*()>([]() -> Shader* { return nullptr; }), true);
405 return eve::script::projectResult(vm, self->setPixelConfig(pixelsPerUnit, refWidth, refHeight));
412 cam2d.addFunc("applyPixelPerfect", [vm = table.getHandle()](Camera2D* self, int viewWidth, int viewHeight) {
475 return eve::script::projectResult(vm, self->setPixelConfig(pixelsPerUnit, refWidth, refHeight));
485 cam.addFunc("applyPixelPerfect", [vm = table.getHandle()](Camera3D* self, int viewWidth, int viewHeight) {
488 cam.addFunc("setPixelOrthographic", [vm = table.getHandle()](Camera3D* self, float pixelsPerUnit, int viewWidth,
623 table.addClass<Material>("Material", std::function<Material*()>([]() -> Material* { return nullptr; }), true);
628 [vm = table.getHandle()](Material* self, float red, float green, float blue, float intensity, float strength,
631 vm, self->setFoliageTranslucency(red, green, blue, intensity, strength, normalDistortion, scattering,
634 material.addFunc("setClearcoat", [vm = table.getHandle()](Material* self, float factor, float roughness) {
637 material.addFunc("setFoliageWindTime", [vm = table.getHandle()](Material* self, float seconds) {
642 material.addFunc("setAlbedoUvOffset", [vm = table.getHandle()](Material* self, float u, float v) {
647 material.addFunc("setAlbedoUvScale", [vm = table.getHandle()](Material* self, float u, float v) {
652 material.addFunc("setAlbedoUvRotation", [vm = table.getHandle()](Material* self, float radians) {
674 auto addMaterialVtLayer = [](Material* self, image::ImageData* albedo, image::ImageData* normal,
710 material.addFunc("copyPbrSurfaceFrom", [vm = table.getHandle()](Material* self, Material* source) {
751 table.addClass<GBuffer>("GBuffer", std::function<GBuffer*()>([]() -> GBuffer* { return nullptr; }), true);
763 "RenderControl", std::function<RenderControl*()>([]() -> RenderControl* { return nullptr; }), true);
766 "requestFeature", [vm = table.getHandle()](RenderControl* rc, const std::string& feature, bool enabled) {
823 rctrl.addFunc("getGBuffer", static_cast<GBuffer* (RenderControl::*)()>(&RenderControl::getGBuffer));
875 [vm = table.getHandle()](Volumetric* value, Graphics* graphics, Texture* depth, Texture* cookie,
877 auto result = value ? value->projectDirectionalCookie(graphics, depth, cookie, worldSize, intensity)
994 auto detailOverwrite = table.addClass<grass::TerrainDetailOverwriteSettings>("TerrainDetailOverwriteSettings");
995 detailOverwrite.addVar("pcgDetailDistance", &grass::TerrainDetailOverwriteSettings::pcgDetailDistance);
996 detailOverwrite.addVar("pcgFadeoutDistance", &grass::TerrainDetailOverwriteSettings::pcgFadeoutDistance);
997 detailOverwrite.addVar("unityDetailDistance", &grass::TerrainDetailOverwriteSettings::unityDetailDistance);
998 detailOverwrite.addVar("unityDetailDensity", &grass::TerrainDetailOverwriteSettings::unityDetailDensity);
1004 grassField.addFunc("bakePlane", static_cast<void (GrassField::*)(float, float, int, int)>(&GrassField::bakePlane));
1023 [vm = table.getHandle()](GrassField* field, const grass::TerrainDetailOverwriteSettings& settings) {
1032 grassField.addFunc("getPhotoModeDensity", [](const GrassField* field) { return field->getPhotoModeDensity(); });
1033 grassField.addFunc("getPhotoModeDistance", [](const GrassField* field) { return field->getPhotoModeDistance(); });
1040 "GroomInstance", std::function<hair::GroomInstance*()>([]() -> hair::GroomInstance* { return nullptr; }), true);
1042 groomInstance.addFunc("draw", static_cast<void (hair::GroomInstance::*)()>(&hair::GroomInstance::draw));
1056 groomInstance.addFunc("setClusterCullingEnabled", &hair::GroomInstance::setClusterCullingEnabled);
1057 groomInstance.addFunc("isClusterCullingEnabled", &hair::GroomInstance::isClusterCullingEnabled);
1059 groomInstance.addFunc("getActiveRepresentation", &hair::GroomInstance::getActiveRepresentation);
1070 groomInstance.addFunc("isGuideSimulationEnabled", &hair::GroomInstance::isGuideSimulationEnabled);
1108 std::function<ReflectionProbeCapture*()>([]() -> ReflectionProbeCapture* { return nullptr; }), true);
1130 probeCapture.addFunc("setEnvironmentLighting", &ReflectionProbeCapture::setEnvironmentLighting);
1131 probeCapture.addFunc("getEnvironmentLighting", &ReflectionProbeCapture::getEnvironmentLighting);
1132 probeCapture.addFunc("getEnvironmentLightingIntensity", &ReflectionProbeCapture::getEnvironmentLightingIntensity);
1137 probeCapture.addFunc("setSkyFaceTextureScale", &ReflectionProbeCapture::setSkyFaceTextureScale);
1138 probeCapture.addFunc("getSkyFaceTextureScale", &ReflectionProbeCapture::getSkyFaceTextureScale);
1145 probeCapture.addFunc("getLastCapturedFaceCount", &ReflectionProbeCapture::getLastCapturedFaceCount);
1146 probeCapture.addFunc("getTotalCapturedFaceCount", &ReflectionProbeCapture::getTotalCapturedFaceCount);
1147 probeCapture.addFunc("getLastFilterSampleCount", &ReflectionProbeCapture::getLastFilterSampleCount);
1151 probeCapture.addFunc("getSmoothedGpuDurationMs", &ReflectionProbeCapture::getSmoothedGpuDurationMs);
1153 probeCapture.addFunc("getAdaptiveFilterSamples", &ReflectionProbeCapture::getAdaptiveFilterSamples);
1161 probeCapture.addFunc("getInfluenceBlendDistance", &ReflectionProbeCapture::getInfluenceBlendDistance);
1163 probeCapture.addFunc("applyConfiguredToCamera", &ReflectionProbeCapture::applyConfiguredToCamera);
1170 probeCapture.addFunc("setCaptureLodDistanceScale", &ReflectionProbeCapture::setCaptureLodDistanceScale);
1171 probeCapture.addFunc("getCaptureLodDistanceScale", &ReflectionProbeCapture::getCaptureLodDistanceScale);
1174 probeCapture.addFunc("setCaptureClusteredLighting", &ReflectionProbeCapture::setCaptureClusteredLighting);
1175 probeCapture.addFunc("getCaptureClusteredLighting", &ReflectionProbeCapture::getCaptureClusteredLighting);
1178 std::function<ReflectionProbeRegistry*()>([]() -> ReflectionProbeRegistry* { return nullptr; }), true);
1184 probeRegistry.addFunc("getLastCapturedFaceCount", &ReflectionProbeRegistry::getLastCapturedFaceCount);
1185 probeRegistry.addFunc("getLastPublishedCount", &ReflectionProbeRegistry::getLastPublishedCount);
1186 probeRegistry.addFunc("setSelectionHysteresis", &ReflectionProbeRegistry::setSelectionHysteresis);
1187 probeRegistry.addFunc("getSelectionHysteresis", &ReflectionProbeRegistry::getSelectionHysteresis);
1188 probeRegistry.addFunc("getLastCandidateCount", &ReflectionProbeRegistry::getLastCandidateCount);
1189 probeRegistry.addFunc("setDistanceCullingEnabled", &ReflectionProbeRegistry::setDistanceCullingEnabled);
1190 probeRegistry.addFunc("getDistanceCullingEnabled", &ReflectionProbeRegistry::getDistanceCullingEnabled);
1196 probeRegistry.addFunc("getLastDistanceCulledCount", &ReflectionProbeRegistry::getLastDistanceCulledCount);
1201 auto water = table.addClass<Water>("Water", std::function<Water*()>([]() -> Water* { return nullptr; }), true);
1203 auto waterMeshSettings = table.addClass("WaterMeshSettings", ssq::Class::Ctor<WaterMeshSettings()>());
1211 "setType", [](WaterMeshSettings* value, int type) { value->type = static_cast<WaterMeshType>(type); });
1212 auto waterGradient = table.addClass("WaterDepthGradient", ssq::Class::Ctor<WaterDepthGradient()>());
1213 waterGradient.addFunc("addColorStop", [vm = table.getHandle()](WaterDepthGradient* value, float time, float red,
1220 waterGradient.addFunc("addAlphaStop", [vm = table.getHandle()](WaterDepthGradient* value, float time, float alpha) {
1227 table.addFunc("calculateWaterMeshTriangles", [vm = table.getHandle()](const WaterMeshSettings* settings) {
1233 water.addFunc("createProceduralMesh", [vm = table.getHandle()](Water* value, const WaterMeshSettings* settings) {
1241 "setDepthGradient", [vm = table.getHandle()](Water* value, const WaterDepthGradient* gradient, int resolution) {
1284 water.addFunc("applyConfigJson", [vm = table.getHandle()](Water* value, const std::string& json) {
1288 return eve::script::projectResult(vm, value->configJson(), [](std::string json) { return json; });
1303 "AmbientOcclusion", std::function<AmbientOcclusion*()>([]() -> AmbientOcclusion* { return nullptr; }), true);
1342 "ContactShadow", std::function<ContactShadow*()>([]() -> ContactShadow* { return nullptr; }), true);
1360 table.addClass<Outline>("Outline", std::function<Outline*()>([]() -> Outline* { return nullptr; }), true);
1384 "GlobalIllumination", std::function<GlobalIllumination*()>([]() -> GlobalIllumination* { return nullptr; }),
1410 std::function<ScreenSpaceReflection*()>([]() -> ScreenSpaceReflection* { return nullptr; }), true);
1432 static_cast<void (ScreenSpaceReflection::*)(Graphics*, Texture*, Texture*, Texture*, Texture*, Canvas*)>(
1437 "AntiAliasing", std::function<AntiAliasing*()>([]() -> AntiAliasing* { return nullptr; }), true);
1469 cls.addFunc("newFont", static_cast<Font* (Graphics::*)(font::FontData*, std::string)>(&Graphics::newFont));
1481 static_cast<Texture* (Graphics::*)(image::ImageData*, bool, bool)>(&Graphics::newTextureFromImageData));
1484 [](Graphics* self, Renderable3D* renderable, image::ImageData* data, bool repeatU, bool repeatV) -> Texture* {
1493 cls.addFunc("updateTextureFromImageData", [](Graphics* self, Texture* texture, image::ImageData* data) {
1501 static_cast<void (Graphics::*)(Texture*, const std::string&, const std::string&, float, float)>(
1511 std::function<bool(Graphics*, Mesh*, ssq::Array, ssq::Array, ssq::Array, int, ssq::Array, int)>(
1514 cls.addFunc("newShader", static_cast<Shader* (Graphics::*)(const std::string&)>(&Graphics::newShader));
1516 cls.addFunc("newMeshShader", static_cast<Shader* (Graphics::*)(const std::string&)>(&Graphics::newMeshShader));
1531 [vm = cls.getHandle()](Graphics* self, Material* material, float directionX, float directionZ, float strength,
1535 vm, self->configureFoliageWind(material, directionX, directionZ, strength, bending, bendingSpeed,
1544 cls.addFunc("setMesh3DViewProj", std::function<void(Graphics*, ssq::Array)>(setMesh3DViewProjScript));
1546 cls.addFunc("setMesh3DCameraPos", std::function<void(Graphics*, float, float, float)>(setMesh3DCameraPosScript));
1598 cls.addFunc("getShadowSchemeLocalMapSize", [](Graphics*) { return ShadowSchemeSettings::current().localMapSize; });
1672ScreenSpaceReflection* Graphics::newScreenSpaceReflection() { return new ScreenSpaceReflection(this); }
1714void Graphics::setSceneDepthOfField(float focusDistance, float maximumBlurPixels, float focusRange, float nearPlane,
1730 const std::string requested = renderControl_ ? renderControl_->getPostProcessQuality() : "high";
1747 Texture* depth = getBackendName() == "webgpu" ? gb->getDepthTexture() : gb->getHwDepthTexture();
1750 pipelineDepthOfField()->apply(resolved, depth, getSceneDofFocusDistance(), getSceneDofMaxBlur(),
1756 resolved = pipelineBloom()->apply(resolved, getSceneBloomIntensity(), getSceneBloomThreshold());
1762 resolved, getSceneExposure(), getSceneAutoExposure(), getSceneAutoExposureMinEV(), getSceneAutoExposureMaxEV(),
1763 glm::vec3(filter.r, filter.g, filter.b), glm::vec3(lift.r, lift.g, lift.b), glm::vec3(invG.r, invG.g, invG.b),
1800Mesh* Graphics::newHairCardMesh(float width, float height) { return hair::newCardMesh(this, width, height); }
1802Material* Graphics::newHairCardMaterial(Texture* albedo) { return hair::makeCardMaterial(this, albedo, nullptr); }
1815ReflectionProbeCapture* Graphics::newReflectionProbeCapture() { return new ReflectionProbeCapture(this); }
1817ReflectionProbeRegistry* Graphics::newReflectionProbeRegistry() { return new ReflectionProbeRegistry(); }
1873 out.write(static_cast<const char*>(png->getData()), static_cast<std::streamsize>(png->getSize()));
1896void Graphics::setBackgroundColorRGBA(float r, float g, float b, float a) { setBackgroundColor(Color(r, g, b, a)); }
1907void Graphics::drawTexturedRectRotatedRGBA(Texture* texture, float cx, float cy, float w, float h, float degrees,
1922Texture* Graphics::newTextureFromImageData(image::ImageData* data, bool repeatU, bool repeatV) {
1924 if (data->getFormat() != "RGBA8") throw eve::Exception("newTextureFromImageData: only RGBA8 supported");
1928 return newTexture(data->getWidth(), data->getHeight(), static_cast<const uint8_t*>(data->getData()), info);
1931Texture* Graphics::newTextureFromImageData(image::ImageData* data, const TextureCreateInfo& info) {
1933 if (data->getFormat() != "RGBA8") throw eve::Exception("newTextureFromImageData: only RGBA8 supported");
1934 return newTexture(data->getWidth(), data->getHeight(), static_cast<const uint8_t*>(data->getData()), info);
1937eve::Result<void> Graphics::updateTextureFromImageData(Texture* texture, image::ImageData* data) {
1947 if (!updateTexture(texture, data->getWidth(), data->getHeight(), static_cast<const uint8_t*>(data->getData())))
1949 eve::DiagnosticCode::Failed, "texture is not owned by this backend, dimensions differ, or upload failed",
1978 return updateTexture(texture, data->getWidth(), data->getHeight(), static_cast<const uint8_t*>(data->getData()));
1982Texture* Graphics::newTextureWithSampler(image::ImageData* data, bool repeatU, bool repeatV, bool generateMipmaps,
1998void Graphics::setTextureSampler(Texture* texture, const std::string& filter, const std::string& mipmap,
2002 if (filter != "nearest" && filter != "Nearest" && filter != "NEAREST" && filter != "linear" && filter != "Linear" &&
2023Font* Graphics::newFont(font::FontData* data, std::string charset) { return new Font(this, data, std::move(charset)); }
Stable, structured diagnostics shared by engine modules.
POD RGB triple for Graphics tone-map controls without glm headers.
std::array< std::uint64_t, kPixelChunkSize *kPixelChunkSize > updated
Definition PixelWorld.cpp:53
#define EV_PROFILE_MODULE(module, name)
Profile the enclosing scope, tagged with a module for grouping.
Definition Profile.h:158
The single Squirrel projection for common Result, Status and Value.
Explicit Value/Owned/Borrowed semantics at the Squirrel boundary.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
Graphics-owned state machine and immutable CPU snapshot authority. @thread Main-thread only; supplied...
Definition FrameCapture.h:133
eve::Result< void > request(std::string key)
Queue a cache miss load without blocking for decode to finish.
Definition Resource.cpp:149
void ignore(std::string_view reason={}) const noexcept
Explicitly discard this result after documenting the reason.
Definition Result.h:571
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
CPU-side decoded font face (FreeType FT_Face + owned font bytes). Does not upload to GPU — rasterize ...
Definition FontData.h:25
Reusable two-texture alpha mask for immediate 2D composition.
Definition AlphaMask.h:12
void draw(Texture *color, Texture *mask, float x, float y, float width, float height, float r=1.f, float g=1.f, float b=1.f, float a=1.f)
Draw a color texture multiplied by a same-UV alpha mask.
Definition AlphaMask.cpp:72
void setThreshold(float threshold)
Set the mask cutoff in normalized alpha space.
Definition AlphaMask.cpp:57
Linear-HDR bloom pyramid with selectable Karis/tent or Gaussian/scatter reconstruction.
Definition Bloom.h:42
float screenToWorldY(float screenX, float screenY, float viewW, float viewH)
Definition RenderSystem.cpp:182
int getPixelScale()
Return the last integer upscale from applyPixelPerfect.
Definition RenderSystem.cpp:174
float worldToScreenY(float worldX, float worldY, float viewW, float viewH)
Definition RenderSystem.cpp:194
void clearPixelConfig()
Clear reference resolution and restore default pixels-per-unit of 1.
Definition RenderSystem.cpp:141
static Camera2D * createCamera(ecs::Table &table= *ecs::current())
Create an active camera in the current ECS table.
Definition CameraFactory.cpp:7
float worldToScreenX(float worldX, float worldY, float viewW, float viewH)
Definition RenderSystem.cpp:188
float screenToWorldX(float screenX, float screenY, float viewW, float viewH)
Convert screen pixel (origin top-left of viewport) to world coordinates. viewW/viewH are the current ...
Definition RenderSystem.cpp:176
void setAmbient(float r, float g, float b)
Definition RenderSystem.cpp:104
void setPosition(float x, float y)
World-space look-at center and zoom (1 = identity).
Definition RenderSystem.cpp:111
void setPixelSnap(bool enabled)
Enable or disable snapping the camera center onto the pixel grid.
Definition RenderSystem.cpp:151
void setPixelPerfect(bool enabled)
Enable or disable automatic perfect-pixel zoom resolution.
Definition RenderSystem.cpp:149
bool getPixelPerfect()
Return whether perfect-pixel resolution is enabled.
Definition RenderSystem.cpp:150
void setBloom(float intensity, float threshold=1.f)
Configure HDR bloom. Zero intensity disables it.
Definition RenderSystem3D.cpp:424
float getPixelsPerUnit()
Return configured pixels per world unit, or 0 when unset.
Definition RenderSystem3D.cpp:277
float getScreenRayOriginY()
Definition RenderSystem3D.cpp:580
void snapToPixelGrid(int viewWidth, int viewHeight)
Snap the eye onto the view-plane pixel grid for the current ortho / pixel sizing.
Definition RenderSystem3D.cpp:309
bool hasPixelConfig()
Return whether a pixels-per-unit config is stored.
Definition RenderSystem3D.cpp:271
static Camera3D * createCamera(ecs::Table &table= *ecs::current())
Create an active camera in the current ECS table.
Definition CameraFactory.cpp:16
void setShadowLayerCullDistance(int layer, float distance)
Set the shadow-caster cull distance for one render layer; zero disables it.
Definition RenderSystem3D.cpp:384
int getPixelScale()
Return the last integer upscale from applyPixelPerfect.
Definition RenderSystem3D.cpp:283
float getEnvProbeExtentX()
Definition RenderSystem3D.cpp:461
void setDepthOfField(float focusDistance, float maxBlurPx, float focusRange=8.f)
Configure Gaussian depth-of-field on the final HDR resolve.
Definition RenderSystem3D.cpp:433
float getFocalLength()
Return physical-camera focal length in millimetres.
Definition RenderSystem3D.cpp:369
void setLayerCullDistance(int layer, float distance)
Set the camera cull distance for one render layer; zero disables the override.
Definition RenderSystem3D.cpp:370
float getDofMaxBlur()
Return DOF max blur in texels (0 when disabled).
Definition RenderSystem3D.cpp:443
float getScreenRayOriginZ()
Definition RenderSystem3D.cpp:581
void setReflectionProbe(int slot, Texture *cubemap, float centerX, float centerY, float centerZ, float extentX, float extentY, float extentZ, float intensity=1.f, float blendDistance=1.f, int priority=0)
Configure one local reflection probe slot.
Definition RenderSystem3D.cpp:465
float getBloomThreshold()
Return bloom threshold in linear HDR units.
Definition RenderSystem3D.cpp:431
void setPerspective()
Return to perspective projection, retaining the configured field of view.
Definition RenderSystem3D.cpp:239
bool isOrthographic()
Return whether the camera currently uses orthographic projection.
Definition RenderSystem3D.cpp:241
float getExposure()
Return exposure compensation in photographic stops.
Definition RenderSystem3D.cpp:413
float getEnvProbeCenterY()
Definition RenderSystem3D.cpp:459
float getEnvProbeCenterX()
Definition RenderSystem3D.cpp:458
void setUp(float x, float y, float z)
Definition RenderSystem3D.cpp:223
void setOrthographic(float height)
Enable a pure orthographic projection with the given vertical world-space span.
Definition RenderSystem3D.cpp:234
void clearEnvProbe()
Disable box projection and return to an infinite-distance environment.
Definition RenderSystem3D.cpp:452
float getOrthoHeight()
Return the vertical world-space span used by orthographic projection.
Definition RenderSystem3D.cpp:243
float getEnvProbeExtentZ()
Definition RenderSystem3D.cpp:463
void clearReflectionProbe(int slot)
Disable one local reflection probe slot.
Definition RenderSystem3D.cpp:479
void setPhysicalLens(float aperture, float focalLength)
Set positive physical-camera aperture and focal length metadata.
Definition RenderSystem3D.cpp:361
float getEnvProbeExtentY()
Definition RenderSystem3D.cpp:462
void screenToRay(float screenX, float screenY, float viewW, float viewH)
Build a world-space picking ray from a screen pixel. Stores origin (camera eye) and normalized direct...
Definition RenderSystem3D.cpp:527
void setExposure(float ev)
Set exposure compensation in photographic stops. Positive values brighten.
Definition RenderSystem3D.cpp:411
float getLayerCullDistance(int layer)
Return the camera cull-distance override for one render layer.
Definition RenderSystem3D.cpp:378
void setEnvIntensity(float intensity)
Definition RenderSystem3D.cpp:409
void setEnvProbe(float centerX, float centerY, float centerZ, float extentX, float extentY, float extentZ)
Enable box-projected IBL for the camera environment cubemap.
Definition RenderSystem3D.cpp:446
void clearPixelConfig()
Clear pixel sizing so applyPixelPerfect / setPixelOrthographic require a fresh config.
Definition RenderSystem3D.cpp:263
void setAutoExposure(bool enabled, float minEV=-8.f, float maxEV=8.f)
Enable log-average automatic exposure and set its EV clamp range.
Definition RenderSystem3D.cpp:415
void setTarget(float x, float y, float z)
Definition RenderSystem3D.cpp:212
float getShadowLayerCullDistance(int layer)
Return the shadow-caster cull-distance override for one render layer.
Definition RenderSystem3D.cpp:392
void clearDepthOfField()
Disable depth-of-field while retaining the current focus settings.
Definition RenderSystem3D.cpp:440
void setPixelSnap(bool enabled)
Enable or disable snapping the eye onto the view-plane pixel grid.
Definition RenderSystem3D.cpp:273
void setAmbient(float r, float g, float b)
Definition RenderSystem3D.cpp:400
int getReflectionProbeCount()
Return the number of enabled local reflection probes.
Definition RenderSystem3D.cpp:484
void setEye(float x, float y, float z)
Definition RenderSystem3D.cpp:201
bool hasEnvProbe()
True when all three box-probe extents are positive.
Definition RenderSystem3D.cpp:454
float getEnvProbeCenterZ()
Definition RenderSystem3D.cpp:460
void setEnvMap(Texture *cube)
Specular IBL cubemap (Graphics::newCubemap). nullptr disables IBL.
Definition RenderSystem3D.cpp:407
void setClipPlanes(float nearZ, float farZ)
Set positive near/far clipping distances; far is kept beyond near.
Definition RenderSystem3D.cpp:354
float getScreenRayOriginX()
Definition RenderSystem3D.cpp:579
virtual Texture * getTexture()=0
Sampleable color buffer; screen Canvas returns nullptr.
Screen-space contact shadows for the primary directional light.
Definition ContactShadow.h:23
Separable Gaussian depth-of-field for the final HDR scene.
Definition DepthOfField.h:18
Texture * apply(Texture *source, Texture *hwDepth, float focusDistance, float maxBlurPx, float focusRange, float nearZ, float farZ)
Apply separable Gaussian DOF.
Definition DepthOfField.cpp:76
Cross-backend min/max hardware-depth pyramid packed into one texture atlas.
Definition DepthPyramid.h:13
virtual void drawOcclusion(Graphics *gfx, const glm::mat4 &matrix) const
Draw as an opaque black silhouette for volumetric occlusion maps (screen-space god rays / light shaft...
Definition Drawable.h:40
virtual void draw(Graphics *gfx, const glm::mat4 &matrix) const =0
Draws the object with the specified transformation matrix.
bool getCastOcclusion() const
When false, skipped by Graphics::drawOcclusion / volumetric occluder passes.
Definition Drawable.h:31
GPU percentile metering, eye adaptation, and linear HDR pre-exposure.
Definition Exposure.h:14
void setExtinction(float extinction)
Signed extinction; negative values carve fog but total density is clamped.
Definition FogVolume.h:30
void setShape(const std::string &shape)
Set shape using "sphere", "box" or "cylinder"; unknown selects box.
Definition FogVolume.cpp:41
void setAlbedo(float r, float g, float b)
Single-scattering albedo, clamped to [0,1].
Definition FogVolume.cpp:60
void setEmissive(float r, float g, float b)
Unlit radiance emitted per unit density.
Definition FogVolume.cpp:64
void setEdgeFalloff(float falloff)
Fraction of normalized radius used for a smooth edge, in [0,1].
Definition FogVolume.cpp:72
void setSize(float x, float y, float z)
Set full world-space dimensions; values are clamped positive.
Definition FogVolume.cpp:56
void setNoise(float amount, float scale, int seed)
Configure deterministic world-space density variation.
Definition FogVolume.cpp:76
GPU-side font: wraps a decoded font::FontData and rasterizes a fixed set of codepoints into a single ...
Definition Font.h:35
float getBaseline() const
Distance from the top of a line to the baseline (== getAscent()).
Definition Font.cpp:174
const Glyph * findGlyph(int codepoint) const
Returns nullptr if codepoint isn't in this Font's atlas.
Definition Font.cpp:180
Screen-space buffers for mid/post effects and Hybrid deferred lighting.
Definition GBuffer.h:28
bool hasBuffer(const std::string &name) const
"depth" | "hwDepth" | "normal" | "albedo" | "pbrParams" | "emissive" | "velocity"
Definition GBuffer.cpp:9
Screen-space single-bounce GI (SSGI). @lifetime All texture arguments are borrowed for the duration o...
Definition GlobalIllumination.h:30
Definition Graphics.h:134
virtual void setDirectionalLight(float dx, float dy, float dz, float r=1.f, float g=1.f, float b=1.f)
Sets the directional light.
Definition Graphics.cpp:273
virtual void drawTexturedRectShaderUV(Texture *texture, Shader *shader, float x, float y, float w, float h, float u0, float v0, float u1, float v1, const Color &color, bool rotatedUV=false, BlendMode blend=BlendMode::Alpha)=0
UV draw with an explicit Shader (nullptr = default textured pipeline).
std::shared_ptr< PrimitiveScene > primitiveScene_
Definition Graphics.h:2341
FramePostTarget
Internal fully overwritten outputs; temporal histories are excluded.
Definition Graphics.h:2281
eve::OptionalRef< IRayTracing > rayTracingService() const noexcept
Borrow the optional ray-tracing service resolved at graphics construction. @ownership Provider-owned;...
Definition Graphics.cpp:186
bool recordingEngine3D_
True while RenderSystem3D is submitting (AO / engine overlays).
Definition Graphics.h:2325
std::unique_ptr< FrameCaptureStore > frameCaptures_
Definition Graphics.h:2290
virtual void drawScene3DRGBA(float x, float y, float w, float h, float r=1.f, float g=1.f, float b=1.f, float a=1.f)
Composite this frame's 3D scene color into a rect (screen or active Canvas). Call after render3D(); o...
Definition Graphics.cpp:254
virtual void renderScene3DToCanvas(Canvas *canvas, Camera3D *camera)
Preview-quality 3D pass into an offscreen Canvas (editor viewport): renders visible Renderable3D with...
Definition Graphics.cpp:221
Shader * prepareSceneColorResolveShader(Texture *scene)
FXAA resolve shader that writes opaque RGB (ignores scene-color depth alpha).
Definition Graphics.cpp:234
std::uint64_t mesh3dDrawEpoch_
Advanced once per render3D(); virtual-texture materials tick at most once per value.
Definition Graphics.h:2323
virtual void popValidationScope()=0
Pops validation scope.
virtual void pushValidationScope()=0
Backend hooks so the platform-independent render3D() can wrap its work in a GPU validation error scop...
virtual void drawCanvasRGBA(Canvas *canvas, float x, float y, float w, float h, float r=1.f, float g=1.f, float b=1.f, float a=1.f)
Draw a Canvas color buffer as a textured rect (same batch order as other 2D).
Definition Graphics.cpp:266
Material * newMaterial()
Create a Material asset (shading model + textures + PBR knobs). Caller owns Material*; not tracked by...
Definition Graphics.cpp:277
void renderScene3DWithShadowsToCanvas(Canvas *canvas, Camera3D *camera)
Render an offscreen editor preview with directional CSM and per-material shadow flags....
Definition Graphics.cpp:227
std::unique_ptr< RenderControl > renderControl_
Definition Graphics.h:2340
virtual void render3D()
Run RenderSystem3D (begin3DFrame + draw visible Renderable3D).
Definition Graphics.cpp:210
virtual void drawTexturedRect(Texture *texture, float x, float y, float w, float h, float r, float g, float b, float a=1.f)
RGBA-float overload matching the script-facing drawTexturedRect name.
Definition Graphics.cpp:1917
eve::cap::ProviderRef< IRayTracing > rayTracing_
Definition Graphics.h:2289
virtual Texture * getSceneColorTexture()
Sampleable 3D color target for the current frame (RGB = lit, A = linear depth). Valid after begin3DFr...
Definition Graphics.h:1075
RenderControl * getRenderControl()
Shared compilable 3D render control (features → pass list + GBuffer). Owned by Graphics; valid for th...
Definition Graphics.cpp:279
FrameCaptureStore & frameCaptures()
Graphics-owned frame capture authority. @thread Engine main thread only. @lifetime Borrowed until Gra...
Definition Graphics.cpp:202
Dense grass + sparse dark tufts on a mesh. Caller owns GrassField*; GPU Mesh / Shader / Texture are o...
Definition Grass.h:193
void setReflectionCaptureMask(uint32_t mask)
Set the reflection-capture visibility layer mask.
Definition Grass.h:288
void setFrameDuration(float seconds)
Definition Grass.cpp:714
uint32_t getReflectionCaptureMask() const
Return the reflection-capture visibility layer mask.
Definition Grass.h:290
bool getReflectionCaptureEnabled() const
Return whether this field is included in reflection-probe captures.
Definition Grass.h:286
Shader * getShader() const
Borrow the shader on the owner thread; valid until this field is destroyed.
Definition Grass.h:297
Mesh * getDenseMesh() const
Borrow the dense mesh on the owner thread; valid until this field rebakes or is destroyed.
Definition Grass.h:293
void setReflectionCaptureEnabled(bool enabled)
Enable or disable inclusion in reflection-probe captures.
Definition Grass.h:284
Texture * getAtlas() const
Borrow the atlas on the owner thread; valid until this field uploads another atlas or is destroyed.
Definition Grass.h:299
Mesh * getSparseMesh() const
Borrow the sparse mesh on the owner thread; valid until this field rebakes or is destroyed.
Definition Grass.h:295
void bakePlane(float sizeX, float sizeZ, int segX, int segZ)
Definition Grass.cpp:693
Optional hardware ray-tracing backend (Vulkan KHR RT).
Definition IRayTracing.h:28
void setColor(float r, float g, float b, float intensity=1.f)
Definition Light.cpp:54
static Light2D * createEmissiveProxy(float x, float y, float r, float g, float b, float intensity=1.f, float radius=200.f)
Create a volumetric-only glow proxy (skips surface lighting).
Definition Light.cpp:16
void setVolumetricOnly(bool enabled)
Definition Light.cpp:86
void setVolumetricIntensity(float intensity)
Definition Light.cpp:81
void setSpotAngle(float degrees)
Outer half-angle of a spot cone in degrees (clamped to (0, 89]).
Definition Light.cpp:65
static Light2D * createLight(const std::string &type="point")
Definition Light.cpp:8
void setSpotAngle(float degrees)
Outer half-angle of a 3D spot cone in degrees (clamped to (0, 89]).
Definition Light.cpp:155
static Light3D * createEmissiveProxy(float x, float y, float z, float r, float g, float b, float intensity=1.f, float radius=8.f)
Create a volumetric-only point glow proxy for emissive props. Pair with a PBR emissive material + blo...
Definition Light.cpp:99
void setDirection(float dx, float dy, float dz)
Definition Light.cpp:133
float getVolumetricIntensity()
Definition Light.cpp:227
void setVolumetricOnly(bool enabled)
Definition Light.cpp:229
void setShadowStrength(float strength)
Definition Light.cpp:216
void setPosition(float x, float y, float z)
Definition Light.cpp:122
static Light3D * createLight(const std::string &type="point")
Definition Light.cpp:91
void setVolumetricIntensity(float intensity)
Definition Light.cpp:224
void setShadowMethod(const std::string &method)
Request a shadow technique: auto, none, csm, perspective, cube. Invalid names leave the previous meth...
Definition Light.cpp:171
void setColor(float r, float g, float b, float intensity=1.f)
Definition Light.cpp:144
void setSpotSoftness(float softness)
Softness of the spot penumbra in [0, 1].
Definition Light.cpp:160
std::string getShadowMethod()
Current shadow method name (auto / none / csm / perspective / cube).
Definition Light.cpp:198
SLG / large-map war-fog overlay driven by a dual-scrolling cloud texture and an RGBA mask bridge (R u...
Definition MapFog.h:18
void setShadowEnabled(bool enabled)
Enable the pre-pass cloud shadow (must draw before the main pass).
Definition MapFog.cpp:344
void setEdgeSoftness(float softness)
Soft edge half-width around the mask R threshold.
Definition MapFog.cpp:342
void draw(float x, float y, float width, float height)
Draw fog over a destination rectangle (shadow pass then main pass).
Definition MapFog.cpp:516
void setCloudMix(float mix)
Mix weight between the two scrolling cloud samples (0..1).
Definition MapFog.cpp:356
void setCloudTiling(float tileA, float tileB)
Dual-layer cloud tiling (layer A / B).
Definition MapFog.cpp:317
Texture * makeCloudTexture(int size=128)
Build a seamless procedural cloud noise texture owned by Graphics.
Definition MapFog.cpp:363
void setTime(float time)
Override the animated time used by cloud scroll (seconds).
Definition MapFog.cpp:306
void setDistortFix(float x, float y)
Correct additive UV drift introduced by distortion.
Definition MapFog.cpp:329
void setCloudTexture(Texture *cloud)
Set or replace the repeating cloud/color texture.
Definition MapFog.cpp:308
void setDistort(float amount)
Mask-UV distortion amount from desaturated cloud noise.
Definition MapFog.cpp:327
void setSelectStrength(float strength)
Selection blink amplitude for mask G.
Definition MapFog.cpp:352
void setCloudSpeed(float speedA, float speedB)
Dual-layer scroll speeds in UV units per second.
Definition MapFog.cpp:322
void setCloudDensity(float contrast, float bias)
Shape cloud alpha: contrast (soft→hard) and bias (coverage).
Definition MapFog.cpp:358
Texture * getMaskTexture() const
Return the current mask texture, or null if unset. @ownership Borrowed; ownership stays with the prov...
Definition MapFog.h:62
void setShadow(float offsetX, float offsetY, float strength)
Shadow UV offset and strength.
Definition MapFog.cpp:346
Texture * getCloudTexture()
Return the active cloud texture (never null after first ensureCloudTexture). @ownership Borrowed; Gra...
Definition MapFog.cpp:310
Packages shading method + surface parameters into one attachable asset.
Definition Material.h:38
void setNormalTexture(Texture *texture)
Set the borrowed material texture. @ownership Graphics factory owns the resource. @lifetime Keep aliv...
Definition Material.h:172
void setAlbedoTexture(Texture *texture)
Set the borrowed material texture. @ownership Graphics factory owns the resource. @lifetime Keep aliv...
Definition Material.h:123
bool hasParam(const std::string &name) const
Optional named float knobs (style / custom shader params).
Definition Material.cpp:205
Texture * getAlbedoTexture() const
Get the borrowed material texture. @ownership Graphics factory owns the resource. @lifetime Keep aliv...
Definition Material.h:128
void setAlphaTechnique(const std::string &technique)
Optional masked transparency quality: "cutoff", "dither", "coverage".
Definition Material.cpp:201
void setBlendMode(const std::string &mode)
Set "alpha", "premultiplied", "additive", or "multiply".
Definition Material.cpp:183
Texture * getNormalTexture() const
Get the borrowed material texture. @ownership Graphics factory owns the resource. @lifetime Keep aliv...
Definition Material.h:177
void setCameraFacing(bool enabled)
Keep a bottom-anchored card facing the active camera around world Y during GPU-driven draws.
Definition Material.h:346
void clearVirtualTexture()
Restore conventional albedo/normal/height interpretation and drop any owned streaming session.
Definition Material.cpp:71
bool getCameraFacing() const
Return whether GPU-driven card vertices use cylindrical camera-facing orientation.
Definition Material.h:348
void setSurfaceMode(const std::string &mode)
Set "opaque", "masked", or "transparent" surface classification.
Definition Material.cpp:166
void setShadingModel(const std::string &model)
"pbr" | "unlit" | "hair" | "custom" (unknown → pbr).
Definition Material.cpp:106
void setTexCellBomb(float cellScale, float strength, float rotAmount=1.f)
Sets the tex cell bomb.
Definition Material.cpp:137
Shader * getShader() const
Return the borrowed shader, or nullptr when the built-in path is active. @lifetime The pointer remain...
Definition Material.h:230
void setParallax(float scale, float minLayers=8.f, float maxLayers=32.f)
Sets the parallax.
Definition Material.cpp:143
float getAlbedoUvRotation() const
Current base-color UV rotation in radians.
Definition Material.h:166
void setShader(Shader *shader)
Set an optional Mesh3D / hair shader; nullptr selects the built-in shading path.
Definition Material.h:227
Screen-space model outline (t3ssel8r-style), computed from the GBuffer hardware depth + world-normal ...
Definition Outline.h:33
Pixel-space sub-rectangle of a Texture (atlas cell / sprite frame). UV conversion uses the texture's ...
Definition Quad.h:11
Incremental six-face HDR scene capture for a runtime reflection probe.
Definition ReflectionProbeCapture.h:26
Scene-level stable selection of published reflection probes for a camera.
Definition ReflectionProbeRegistry.h:14
void setPostProcessQuality(const std::string &quality)
Set the unified post-process quality for TAA, RTGI and SSR.
Definition RenderControl.h:197
void compile()
Rebuild the executable pass list from current feature flags.
Definition RenderControl.cpp:305
void enable(const std::string &feature)
Compatibility-only feature enablement; use requestFeature to observe failure.
Definition RenderControl.cpp:281
std::string getReflectionQuality() const
Return the shared TAA/RTGI/SSR quality preset.
Definition RenderControl.h:195
void disable(const std::string &feature)
Compatibility-only feature disablement; use requestFeature to observe failure.
Definition RenderControl.cpp:286
bool isDeferredLightingAvailable() const
True when deferredLighting can be inserted for Hybrid. Requires an attached Graphics backend that imp...
Definition RenderControl.cpp:127
std::string pathTracingDiagnostic() const
Owning diagnostic copy explaining the latest raster fallback.
Definition RenderControl.h:123
std::string getPostProcessQuality() const
Return the unified post-process quality for TAA, RTGI and SSR.
Definition RenderControl.h:199
bool hasHybridLightingFallback() const
True after compile() when Hybrid was requested but could not run (deferred lighting unavailable,...
Definition RenderControl.h:167
std::string getPassName(int index) const
Return the compiled pass name at index, or an empty string.
Definition RenderControl.cpp:348
void setReflectionQuality(const std::string &quality)
Set the shared TAA/RTGI/SSR quality preset used by the automatic reflection chain.
Definition RenderControl.cpp:298
static void setDirectionalLight(float dx, float dy, float dz, float r, float g, float b)
Legacy single directional light used when no enabled Light3D exists.
Definition RenderSystem3D.cpp:586
static void renderWithShadowsToCanvas(Graphics &gfx, Canvas &target, Camera3D &camera)
Render an editor preview with directional cascaded shadows before forward shading....
Definition RenderSystem3D.cpp:2043
static void renderToCanvas(Graphics &gfx, Canvas *target, Camera3D *camera, uint32_t reflectionCaptureMask=0xffffffffu, float lodDistanceScale=1.f, bool includeTransparent=true, bool useClusteredLighting=true, Texture *skyFaceTexture=nullptr, Mesh *skyQuad=nullptr, float skyFaceTextureScale=1.f, bool includePrimitives=false)
Forward 3D pass into an offscreen canvas using multipart materials, LOD, masked surfaces and sorted t...
Definition RenderSystem3D.cpp:2034
Default renderable entity for declarative 2D sprites / solid quads.
Definition RenderSystem.h:119
void setCastOcclusion(bool cast)
Enable or disable volumetric occlusion casting.
Definition RenderSystem.cpp:200
void setVisible(bool visible)
Include or exclude the sprite from collection.
Definition RenderSystem.cpp:61
void setBlend(const std::string &blend)
Set blend mode (alpha or additive).
Definition RenderSystem.cpp:65
void setNormalTexture(Texture *texture)
Assign an optional tangent-space normal map for the GPU lit2d path.
Definition RenderSystem.cpp:49
void setFrameLayout(int sourceW, int sourceH, int trimW, int trimH, int offsetX, int offsetY)
Apply trimmed-frame layout while preserving the original canvas origin.
Definition RenderSystem.cpp:96
void setFlip(bool horizontal, bool vertical)
Mirror atlas UVs without changing transform scale.
Definition RenderSystem.cpp:90
Texture * getNormalTexture()
Return the assigned normal map, or nullptr when unlit/flat. @ownership Returns a borrowed Texture*; t...
Definition RenderSystem.cpp:50
bool getCastOcclusion()
Return whether the sprite casts volumetric occlusion.
Definition RenderSystem.cpp:202
void setAnchor(float x, float y)
Set normalized transform pivot; (0,0) top-left, (0.5,0.5) center.
Definition RenderSystem.cpp:84
void setSize(float width, float height)
Set unscaled sprite dimensions in pixels.
Definition RenderSystem.cpp:39
void setReceiveLight(bool receive)
Enable or disable 2D light reception.
Definition RenderSystem.cpp:63
Screen-space reflections (SSR) as a fullscreen post pass. @lifetime All Graphics and texture argument...
Definition ScreenSpaceReflection.h:30
bool hasUniform(const std::string &name) const
Definition Shader.cpp:71
void sendVec2(const std::string &name, float x, float y)
Definition Shader.cpp:109
void sendFloat(const std::string &name, float x)
Definition Shader.cpp:107
void sendVec3(const std::string &name, float x, float y, float z)
Definition Shader.cpp:114
int declareMatrix(const std::string &name)
Definition Shader.cpp:59
int getUniformIndex(const std::string &name) const
Definition Shader.cpp:73
int declareFloat(const std::string &name)
Reserve sequential float slots in the push-constant block. Returns start index.
Definition Shader.cpp:55
void sendVec4(const std::string &name, float x, float y, float z, float w)
Definition Shader.cpp:119
GPU texture created via Graphics::newTexture. Owns GPU resources through an opaque backend handle.
Definition Texture.h:15
const char * getAlphaConvention() const
Returns the alpha convention spelling.
Definition Texture.cpp:58
void setAlphaConvention(const char *value)
Declare whether RGB is straight or already multiplied by alpha.
Definition Texture.cpp:54
void scatter(Graphics *gfx, Texture *occlusion)
Scatter-only: occlusion → shafts with alpha (draw over a prior scene). Writes to the currently bound ...
Definition Volumetric.cpp:668
void scatterTo(Graphics *gfx, Texture *occlusion, Canvas *dest)
Same as scatter but into an explicit destination.
Definition Volumetric.cpp:673
void drawOccluder(Graphics *gfx, Drawable *drawable, const glm::mat4 &matrix)
Drawable occlusion (respects Drawable::getCastOcclusion).
Definition Volumetric.cpp:636
void setMode(const std::string &mode)
"screenspace" | "raymarch" | "fog" | "froxel" | "cloud".
Definition Volumetric.cpp:350
void setCloudLightColor(float r, float g, float b)
Direct sunlight color used by cloud single scattering.
Definition Volumetric.cpp:506
void setLightScreenPos(float x, float y, float width, float height)
Pixel-space helper (converts with width/height).
Definition Volumetric.cpp:374
void setCloudScale(float worldScale)
Horizontal size of procedural cloud features in world units.
Definition Volumetric.cpp:495
void beginOcclusionMap(Graphics *gfx, float lightPixelX, float lightPixelY, float lightRadiusPixels=24.f)
Clear the current canvas to black and draw a bright light disc (start of an occlusion map)....
Definition Volumetric.cpp:624
void setCloudLayer(float bottom, float top)
Set cloud layer world-space bottom and top heights.
Definition Volumetric.cpp:478
void applyFromScene(Graphics *gfx, Texture *scene)
Single-pass: treat source as the scene (bright regions ≈ light), add shafts + dust/fog onto it....
Definition Volumetric.cpp:682
void drawOccluders2D(Graphics *gfx)
Draw all visible Renderable2D with castOcclusion into the current canvas as black silhouettes (shadow...
Definition Volumetric.cpp:652
void injectFroxelHeightFog(float extinction, float albedoR, float albedoG, float albedoB, float baseHeight, float heightFalloff, float minWorldY, float maxWorldY)
Inject an exponential global height layer into the froxel grid.
Definition Volumetric.cpp:769
void rayMarchTo(Graphics *gfx, Texture *linearDepth, Canvas *dest)
Ray march to.
Definition Volumetric.cpp:701
void uploadFroxel(Graphics *gfx)
Upload integrated froxels into a slice atlas sampled by applyFroxel.
Definition Volumetric.cpp:813
void setLightScreenUV(float u, float v)
Light position in UV (0..1), origin top-left to match 2D UVs.
Definition Volumetric.cpp:364
void rayMarch(Graphics *gfx, Texture *linearDepth)
Ray march participating media using a linear-depth texture (R channel, 0=near .. 1=far)....
Definition Volumetric.cpp:696
void setCamera(float eyeX, float eyeY, float eyeZ, float targetX, float targetY, float targetZ, float upX, float upY, float upZ, float fovYDeg, float aspect, float nearZ, float farZ)
Camera for ray march reconstruction (RH + ZO). Builds inv(viewProj) and near/far used by rayMarch*.
Definition Volumetric.cpp:403
void setAnisotropy(float g)
Henyey–Greenstein anisotropy for raymarch shafts in [-0.99, 0.99]. Positive values produce forward-sc...
Definition VolumetricLights.cpp:192
void injectFroxelLocalVolume(FogVolume *volume)
Inject an analytic local fog volume using the camera from setCamera().
Definition Volumetric.cpp:777
void renderCloudsTo(Graphics *gfx, Texture *linearDepth, Canvas *dest)
Renders clouds to.
Definition Volumetric.cpp:749
void setLightDirection(float dx, float dy, float dz)
World-space direction toward the lit surface (ray march / phase).
Definition Volumetric.cpp:380
void applyFroxel(Graphics *gfx, Texture *linearDepth)
Composite the uploaded froxel volume over the current target using scene depth.
Definition Volumetric.cpp:850
void renderClouds(Graphics *gfx, Texture *linearDepth)
Render the bounded cloud layer using scene linear depth for occlusion.
Definition Volumetric.cpp:744
void setCloudWind(float x, float z)
Cloud wind velocity in world X/Z units per second.
Definition Volumetric.cpp:500
void setQuality(const std::string &quality)
"low" | "medium" | "high" (unknown → medium).
Definition Volumetric.cpp:345
void setFogHeight(float worldY)
Height fog: denser near world Y = fogHeight; falloff is 1/meters scale.
Definition Volumetric.cpp:453
void integrateFroxel(float lightR, float lightG, float lightB, float phaseScale=1.f)
Integrate the current froxel media using a uniform incident light.
Definition Volumetric.cpp:782
void applyFromSceneTo(Graphics *gfx, Texture *scene, Canvas *dest)
Applies from scene to.
Definition Volumetric.cpp:687
void configureFroxelGrid(int width, int height, int depth, float nearDistance, float farDistance)
Configure the CPU reference/fallback froxel grid used by the atlas renderer. Quality presets choose s...
Definition Volumetric.cpp:758
void applyFogTo(Graphics *gfx, Texture *linearDepth, Canvas *dest)
Applies fog to.
Definition Volumetric.cpp:715
void applyFroxelTo(Graphics *gfx, Texture *linearDepth, Canvas *dest)
Composite the uploaded froxel volume into an explicit destination.
Definition Volumetric.cpp:860
void drawOccluderTexture(Graphics *gfx, Texture *texture, float x, float y, float w, float h)
Draws occluder texture.
Definition Volumetric.cpp:646
void setFogStart(float startDistance)
View-distance ramp where fog appears (world units along the ray).
Definition Volumetric.cpp:463
void applyFog(Graphics *gfx, Texture *linearDepth)
Volumetric height/distance fog from a linear-depth texture. Writes fog RGB with alpha = 1-transmittan...
Definition Volumetric.cpp:710
void setCloudDensity(float density)
Cloud density multiplier, clamped non-negative.
Definition Volumetric.cpp:490
void drawOccluderSolid(Graphics *gfx, float x, float y, float w, float h)
Convenience 2D black silhouette (solid or textured alpha).
Definition Volumetric.cpp:641
int resolutionFor(int fullSize) const
Downscale helper: returns floor(dim / downscale), at least 1. Callers create occlusion / scatter canv...
Definition Volumetric.cpp:562
Dynamic water surface with sky reflection and animated ripples.
Definition Water.h:68
Flowing waterfall (falling water sheet) rendered on a vertical plane.
Definition Waterfall.h:33
Runtime groom drawable (UE UGroomComponent analogue).
Definition GroomInstance.h:44
Graphics-owned CPU resource provider for generated mesh artifacts.
const Value * field(const Value &value, const char *key)
Borrow an optional object field.
Definition BuildingSnapshot.cpp:96
@ Exception
void exposeRenderable3DBindings(ssq::Table &table)
Expose renderable 3 d bindings.
Definition Renderable3DBindings.cpp:12
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
Shader * createTreeWindShader(Graphics *graphics)
Create a backend-native tree Mesh3D shader using the engine PBR fragment stage.
Definition TreeWindShader.cpp:22
Result< int > calculateWaterMeshTriangles(const WaterMeshSettings &settings)
Calculate Pcg PWS_WaterSystem's triangle count without allocating a mesh.
Definition Water.cpp:150
void exposePrimitiveScriptBindings(ssq::Table &table, ssq::Class &cls)
Registers owning primitive proxies on the VM owner thread; retains no table references.
Definition PrimitivePath.cpp:572
void exposeWaterReflectionMaskerBindings(ssq::Table &table)
Register Pcg reflection-mask bindings.
Definition Water.cpp:707
void exposeGrassWindBindings(ssq::Table &table)
Register wind state/profile and checked operations on the VM owner thread, retaining no table referen...
Definition GrassWind.cpp:76
eve::Color Color
RGBA color used by every graphics draw call. Lives inside eve::graphics so including a graphics heade...
Definition Color.h:13
void exposeGraphicsMeshes(ssq::Table &table)
Register mesh script bindings; table is borrowed synchronously.
Definition GraphicsMeshBindings.cpp:11
void exposeWaterPlanarReflectionBindings(ssq::Table &table)
Register planar water-reflection value types and checked planner with the VM owner thread.
Definition Water.cpp:550
uint32_t nextCodepointUtf8(const std::string &text, size_t &i)
Decodes one UTF-8 codepoint from text starting at byte offset i, advancing i past it....
Definition Font.cpp:17
void exposeCanvasScriptBindings(ssq::Table &table)
Register canvas bindings on the VM owner thread; retains no table reference.
Definition Canvas.cpp:15
WaterMeshType
Pcg procedural water mesh shape. Custom meshes remain caller-supplied Mesh resources.
Definition Water.h:14
void exposeShaderScriptBindings(ssq::Table &table, ssq::Class &cls)
Register shader loading and binary replacement on the VM owner thread. Borrows both tables for this c...
Definition ShaderResourceScriptBindings.cpp:656
void detachGraphicsArtifactProvider(Graphics *graphics) noexcept
Detach a Graphics instance before its derived backend is destroyed.
Definition ArtifactProvider.cpp:490
void exposeWaterSystemBindings(ssq::Table &table)
Register water-system value types and checked operations with the VM owner thread.
Definition WaterSystemBindings.cpp:11
void exposeDepthOfFieldFocusBindings(ssq::Table &table)
Register Pcg autofocus value types and evaluator.
Definition DepthOfFieldFocusBindings.cpp:5
void exposeWaterUnderwaterEffectsBindings(ssq::Table &table)
Register underwater-effects value types and checked transition with the VM owner thread.
Definition WaterUnderwaterEffectsBindings.cpp:12
void exposeFontAndDamageNumberBindings(ssq::Table &table, ssq::Class &graphicsClass)
Register font and popup script types on the VM owner thread; retain no table references.
Definition DamageNumbersBindings.cpp:33
int clampShadowMapSize(int size)
Clamp/round a requested map size to an allowed power-of-two.
Definition Shadow.cpp:218
@ AtlasPageTable
void registerGraphicsArtifactProvider(Graphics *graphics)
Register the graphics provider in the common capability registry.
Definition ArtifactProvider.cpp:484
Result< void > setShadowSchemeMapSizes(int directionalMapSize, int localMapSize)
Apply directional (and optional local) map sizes with validation. @cost Cheap CPU clamp; GPU recreate...
Definition Shadow.cpp:253
void exposePcgWaterPhotoModeBindings(ssq::Table &t)
Register Pcg water photo-mode authority bindings.
Definition PcgWaterPhotoMode.cpp:33
Result< void > setShadowSchemeDirectionalMaxDistance(float meters)
Apply CSM max distance with validation.
Definition Shadow.cpp:269
void registerGraphicsCapabilities()
Registers graphics capabilities.
Definition GraphicsCapabilities.cpp:688
void exposeVegetationScriptBindings(ssq::Table &table, ssq::Class &graphicsClass)
Register vegetation field bindings on the VM owner thread. Borrows tables for this call; no script ca...
Definition VegetationScriptBindings.cpp:15
ssq::Table projectResult(HSQUIRRELVM vm, Result< void > &&result)
Consume and project a void native Result using the common schema.
Definition SquirrelBinding.cpp:540
@ InvalidArgument
@ Unsupported
@ Failed
std::optional< std::reference_wrapper< T > > OptionalRef
Optional borrowed reference; it does not extend T's lifetime.
Definition BorrowedRef.h:24
@ Alpha
@ Opaque
glm::vec4 Color
Render-neutral RGBA color shared by graphics-facing modules.
Definition RenderTypes.h:8
@ Water
@ Graphics
Definition Container.h:602
DeferredFileTexture public API.
Definition Graphics.h:2292
Linear RGB triple used by scene color-grade getters/setters.
Definition GraphicsRgb.h:11
Options for Graphics::newTexture / newCubemap. When generateMipmaps is true and sampler....
Definition TextureSampler.h:117
bool generateMipmaps
Definition TextureSampler.h:119
Sampler state for a Texture (filter, wrap, mip LOD, anisotropy). Defaults match historical engine beh...
Definition TextureSampler.h:24
float snowFadeDistance
Definition Grass.h:49
float snowMinimumHeight
Definition Grass.h:48
float hardRenderDistance
Definition Grass.h:46
int detailResolutionPerPatch
Definition Grass.h:60
float unityDetailDensity
Definition Grass.h:59
float pcgFadeoutDistance
Definition Grass.h:57
float pcgDetailDistance
Definition Grass.h:56
int unityDetailDistance
Definition Grass.h:58