@@ -101,9 +101,11 @@ interface
101
101
type
102
102
R3D_Bloom = Integer;
103
103
const
104
- R3D_BLOOM_DISABLED = R3D_Bloom(0 ); // < Bloom effect is disabled.
105
- R3D_BLOOM_ADDITIVE = R3D_Bloom(1 ); // < Enhances bright areas by adding light to them (stronger glow effect).
106
- R3D_BLOOM_SOFT_LIGHT = R3D_Bloom(2 ); // < Creates a softer, more diffused glow around bright areas.
104
+ R3D_BLOOM_DISABLED = R3D_Bloom(0 ); // Bloom effect is disabled. The scene is rendered without any glow enhancement.
105
+ R3D_BLOOM_MIX = R3D_Bloom(1 ); // Blends the bloom effect with the original scene using linear interpolation (Lerp).
106
+ R3D_BLOOM_ADDITIVE = R3D_Bloom(2 ); // Adds the bloom effect additively to the scene, intensifying bright regions.
107
+ R3D_BLOOM_SCREEN = R3D_Bloom(3 ); // Combines the scene and bloom using screen blending, which brightens highlights
108
+
107
109
108
110
type
109
111
R3D_Fog = Integer;
@@ -122,7 +124,6 @@ interface
122
124
R3D_TONEMAP_ACES = R3D_Tonemap(3 ); // < ACES tone mapping, a high-quality cinematic rendering technique.
123
125
R3D_TONEMAP_AGX = R3D_Tonemap(4 ); // < AGX tone mapping, a modern technique designed to preserve both highlight and shadow details for HDR rendering.
124
126
125
-
126
127
type
127
128
PR3D_Light = ^TR3D_Light;
128
129
TR3D_Light = Cardinal; // Cardinal is an unsigned 32-bit integer in Pascal
@@ -1407,63 +1408,26 @@ procedure R3D_SetBloomIntensity(value: Single); cdecl; external {$IFNDEF RAY_STA
1407
1408
function R3D_GetBloomIntensity (): Single; cdecl; external { $IFNDEF RAY_STATIC} r3dName{ $ENDIF} name ' R3D_GetBloomIntensity' ;
1408
1409
1409
1410
(*
1410
- * @brief Sets the HDR threshold for bloom.
1411
- *
1412
- * This function defines the brightness threshold above which pixels contribute
1413
- * to the bloom effect. Lower values will make more areas of the image glow.
1414
- *
1415
- * @param value The HDR threshold for bloom.
1416
- *)
1417
- procedure R3D_SetBloomHdrThreshold (value : Single); cdecl; external { $IFNDEF RAY_STATIC} r3dName{ $ENDIF} name ' R3D_SetBloomHdrThreshold' ;
1418
-
1419
- (*
1420
- * @brief Gets the current HDR threshold for bloom.
1421
- *
1422
- * This function retrieves the brightness threshold above which pixels contribute
1423
- * to the bloom effect.
1424
- *
1425
- * @return The current HDR threshold for bloom.
1426
- *)
1427
- function R3D_GetBloomHdrThreshold (): Single; cdecl; external { $IFNDEF RAY_STATIC} r3dName{ $ENDIF} name ' R3D_GetBloomHdrThreshold' ;
1428
-
1429
- (*
1430
- * @brief Sets the HDR threshold for the sky in bloom.
1431
- *
1432
- * This function defines a separate HDR threshold for the sky when applying bloom.
1433
- * This allows finer control over the intensity of the bloom effect on sky elements.
1434
- *
1435
- * @param value The HDR threshold for bloom on the sky.
1436
- *)
1437
- procedure R3D_SetBloomSkyHdrThreshold (value : Single); cdecl; external { $IFNDEF RAY_STATIC} r3dName{ $ENDIF} name ' R3D_SetBloomSkyHdrThreshold' ;
1438
-
1439
- (*
1440
- * @brief Gets the current HDR threshold for bloom on the sky.
1441
- *
1442
- * This function retrieves the HDR threshold specifically applied to the sky for bloom.
1443
- *
1444
- * @return The current HDR threshold for sky bloom.
1445
- *)
1446
- function R3D_GetBloomSkyHdrThreshold (): Single; cdecl; external { $IFNDEF RAY_STATIC} r3dName{ $ENDIF} name ' R3D_GetBloomSkyHdrThreshold' ;
1447
-
1448
- (*
1449
- * @brief Sets the number of iterations for the bloom effect.
1411
+ * @brief Sets the bloom filter radius.
1450
1412
*
1451
- * This function defines how many iterations are performed to blur the bright areas.
1452
- * Higher values result in a smoother and more pronounced bloom effect but may
1453
- * impact performance.
1413
+ * Controls the radius of the blur filter applied during the upscaling stage
1414
+ * of the bloom effect. A larger radius results in a wider glow around bright
1415
+ * objects, creating a softer and more diffuse bloom. A value of 0 disables
1416
+ * the filtering effect, preserving sharp bloom highlights.
1454
1417
*
1455
- * @param value The number of bloom iterations .
1418
+ * @param value The radius of the bloom filter (in pixels or arbitrary units depending on implementation) .
1456
1419
*)
1457
- procedure R3D_SetBloomIterations (value : Integer); cdecl; external { $IFNDEF RAY_STATIC} r3dName{ $ENDIF} name ' R3D_SetBloomIterations ' ;
1420
+ procedure R3D_SetBloomFilterRadius (value : Integer); cdecl; external { $IFNDEF RAY_STATIC} r3dName{ $ENDIF} name ' R3D_SetBloomFilterRadius ' ;
1458
1421
1459
- (*
1460
- * @brief Gets the current number of bloom iterations.
1461
- *
1462
- * This function retrieves the number of iterations used to process the bloom effect.
1463
- *
1464
- * @return The current number of bloom iterations.
1465
- *)
1466
- function R3D_GetBloomIterations (): Integer; cdecl; external { $IFNDEF RAY_STATIC} r3dName{ $ENDIF} name ' R3D_GetBloomIterations' ;
1422
+ (*
1423
+ * @brief Gets the current bloom filter radius.
1424
+ *
1425
+ * Retrieves the current radius used for the bloom filter. This value determines
1426
+ * how far the glow effect extends around bright areas in the scene.
1427
+ *
1428
+ * @return The current bloom filter radius.
1429
+ *)
1430
+ function R3D_GetBloomFilterRadius (): Integer; cdecl; external { $IFNDEF RAY_STATIC} r3dName{ $ENDIF} name ' R3D_GetBloomFilterRadius' ;
1467
1431
1468
1432
// --------------------------------------------
1469
1433
// ENVIRONMENT: Fog Config Functions
@@ -2034,19 +1998,6 @@ procedure R3D_DrawBufferORM(x, y, w, h: Single); cdecl; external {$IFNDEF RAY_ST
2034
1998
*)
2035
1999
procedure R3D_DrawBufferSSAO (x, y, w, h: Single); cdecl; external { $IFNDEF RAY_STATIC} r3dName{ $ENDIF} name ' R3D_DrawBufferSSAO' ;
2036
2000
2037
- (*
2038
- * @brief Renders the bright colors buffer to the screen.
2039
- *
2040
- * Displays the bright color buffer, which is used for bloom effects.
2041
- * Must be called outside of `R3D_Begin` and `R3D_End`.
2042
- *
2043
- * @param x X position to draw the buffer.
2044
- * @param y Y position to draw the buffer.
2045
- * @param w Width of the drawn buffer.
2046
- * @param h Height of the drawn buffer.
2047
- *)
2048
- procedure R3D_DrawBufferBrightColors (x, y, w, h: Single); cdecl; external { $IFNDEF RAY_STATIC} r3dName{ $ENDIF} name ' R3D_DrawBufferBrightColors' ;
2049
-
2050
2001
(*
2051
2002
* @brief Renders the bloom buffer to the screen.
2052
2003
*
0 commit comments