summaryrefslogtreecommitdiffstats
path: root/sdk/rwsdk/include/d3d8/rpltmap.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-08-02 18:49:12 +0200
committerSergeanur <s.anureev@yandex.ua>2020-08-02 18:49:12 +0200
commit3e24ae8812ca4a0031d82ea7f7393605b8a4283a (patch)
tree5cc79378e86970d3b63cbed173d627410ea90ca6 /sdk/rwsdk/include/d3d8/rpltmap.h
parentMerge pull request #669 from erorcun/miami (diff)
parentMove sdk and eax (diff)
downloadre3-3e24ae8812ca4a0031d82ea7f7393605b8a4283a.tar
re3-3e24ae8812ca4a0031d82ea7f7393605b8a4283a.tar.gz
re3-3e24ae8812ca4a0031d82ea7f7393605b8a4283a.tar.bz2
re3-3e24ae8812ca4a0031d82ea7f7393605b8a4283a.tar.lz
re3-3e24ae8812ca4a0031d82ea7f7393605b8a4283a.tar.xz
re3-3e24ae8812ca4a0031d82ea7f7393605b8a4283a.tar.zst
re3-3e24ae8812ca4a0031d82ea7f7393605b8a4283a.zip
Diffstat (limited to 'sdk/rwsdk/include/d3d8/rpltmap.h')
-rw-r--r--sdk/rwsdk/include/d3d8/rpltmap.h99
1 files changed, 99 insertions, 0 deletions
diff --git a/sdk/rwsdk/include/d3d8/rpltmap.h b/sdk/rwsdk/include/d3d8/rpltmap.h
new file mode 100644
index 00000000..18c91955
--- /dev/null
+++ b/sdk/rwsdk/include/d3d8/rpltmap.h
@@ -0,0 +1,99 @@
+
+/**
+ * \defgroup rpltmap RpLtMap
+ * \ingroup lighting
+ *
+ * Lightmap Plugin for RenderWare Graphics.
+ */
+
+#ifndef RPLTMAP_H
+#define RPLTMAP_H
+
+/*===========================================================================*
+ *--- Includes --------------------------------------------------------------*
+ *===========================================================================*/
+
+#include "rwcore.h"
+#include "rpworld.h"
+
+
+/* Used during lightmap illumination (sliver triangles are skipped
+ * (their texels should be filled by dilate()), because their normals
+ * can't be accurately calculated) */
+#define rpLTMAPDEFAULTSLIVERAREATHRESHOLD (0.001f)
+
+/* Used during lightmap UV calculation (polySets may be
+ * joined on the basis of vertices with equal positions) */
+#define rpLTMAPDEFAULTVERTEXWELDTHRESHOLD (0.1f)
+
+#define rpLTMAPDEFAULTLIGHTMAPSIZE 128
+#define rpLTMAPMINLIGHTMAPSIZE 16
+#define rpLTMAPMAXLIGHTMAPSIZE 512/*?? any better way of determining this ??*/
+
+#define rpLTMAPMAXPREFIXSTRINGLENGTH 4
+
+#define rpLTMAPDEFAULTMAXAREALIGHTSAMPLESPERMESH 256
+/* The default tolerance for errors induced by area light ROIs is 1
+ * (being the smallest difference in lightmap colour values) */
+#define rpLTMAPDEFAULTAREALIGHTROICUTOFF (1.0f)
+
+
+/**
+ * \ingroup rpltmap
+ * \ref RpLtMapStyle
+ * Flags specifying the rendering style of the lightmap plugin.
+ *
+ * \see RpLtMapGetRenderStyle
+ * \see RpLtMapSetRenderStyle
+ */
+enum RpLtMapStyle
+{
+ rpLTMAPSTYLENASTYLE = 0x0,
+
+ rpLTMAPSTYLERENDERBASE = 0x1, /**< The base texture should be rendered */
+ rpLTMAPSTYLERENDERLIGHTMAP = 0x2, /**< The lightmap should be rendered */
+ rpLTMAPSTYLEPOINTSAMPLE = 0x4, /**< The lightmap should be point-sampled */
+
+ rpLTMAPSTYLEFORCEENUMSIZEINT = 0x7FFFFFFF
+};
+typedef enum RpLtMapStyle RpLtMapStyle;
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+extern RwBool
+RpLtMapPluginAttach(void);
+
+extern RxPipeline *
+RpLtMapGetPlatformAtomicPipeline(void);
+extern RxPipeline *
+RpLtMapGetPlatformWorldSectorPipeline(void);
+
+extern RwBool
+RpLtMapSetRenderStyle(RpLtMapStyle style, RpWorld *world);
+extern RpLtMapStyle
+RpLtMapGetRenderStyle(void);
+
+extern RwUInt32
+RpLtMapWorldLightMapsQuery(RpWorld *world);
+
+extern RwTexture *
+RpLtMapWorldSectorGetLightMap(RpWorldSector *sector);
+extern RpWorldSector *
+RpLtMapWorldSectorSetLightMap(RpWorldSector *sector, RwTexture *lightMap);
+extern RwTexture *
+RpLtMapAtomicGetLightMap(RpAtomic *atomic);
+extern RpAtomic *
+RpLtMapAtomicSetLightMap(RpAtomic *atomic, RwTexture *lightMap);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* RPLTMAP_H */
+
+