Просмотр исходного кода

FP16 support for render textures

Ivan Safrin 13 лет назад
Родитель
Сommit
e51535ea41

+ 3 - 2
Core/Contents/Include/PolySceneRenderTexture.h

@@ -39,9 +39,10 @@ namespace Polycode {
 			* @param targetScene Target scene to render.
 			* @param Camera to render from.
 			* @param renderWidth Horizontal size of the render texture.
-			* @param renderHeight Vertical size of the render texture.			
+			* @param renderHeight Vertical size of the render texture.
+			* @param floatingPoint Pass true if you want fp16 target renders			
 			*/
-			SceneRenderTexture(Scene *targetScene, Camera *targetCamera, int renderWidth,int renderHeight);
+			SceneRenderTexture(Scene *targetScene, Camera *targetCamera, int renderWidth,int renderHeight, bool floatingPoint = false);
 			~SceneRenderTexture();
 			
 			void drawScreen();

+ 3 - 3
Core/Contents/Source/PolySceneRenderTexture.cpp

@@ -28,14 +28,14 @@
 
 using namespace Polycode;
 
-SceneRenderTexture::SceneRenderTexture(Scene *targetScene, Camera *targetCamera, int renderWidth,int renderHeight) {
+SceneRenderTexture::SceneRenderTexture(Scene *targetScene, Camera *targetCamera, int renderWidth,int renderHeight, bool floatingPoint) {
 //	targetTexture = CoreServices::getInstance()->getMaterialManager()->createTexture(renderWidth, renderHeight, NULL,true);
-	CoreServices::getInstance()->getRenderer()->createRenderTextures(&targetTexture, &depthTexture, renderWidth, renderHeight, false);
+	CoreServices::getInstance()->getRenderer()->createRenderTextures(&targetTexture, &depthTexture, renderWidth, renderHeight, floatingPoint);
 	this->targetScene = targetScene;
 	this->targetCamera = targetCamera;
 	
 	
-	CoreServices::getInstance()->getRenderer()->createRenderTextures(&filterColorBufferTexture, &filterZBufferTexture, renderWidth, renderHeight, true);
+	CoreServices::getInstance()->getRenderer()->createRenderTextures(&filterColorBufferTexture, &filterZBufferTexture, renderWidth, renderHeight, floatingPoint);
 	
 	
 	CoreServices::getInstance()->getSceneManager()->registerRenderTexture(this);