forked from OpenXRay/xray-16
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OpenGL: fixed unpacking color in 'editor' shader, added fxaa shader a…
…nd blender
- Loading branch information
1 parent
1bbfb51
commit 359ddb8
Showing
8 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "common.h" | ||
#include "iostructs\v_TL.h" | ||
|
||
uniform float4 screen_res; // Screen resolution (x-Width,y-Height, zw - 1/resolution) | ||
|
||
////////////////////////////////////////////////////////////////////////////////////////// | ||
// Vertex | ||
v2p_TL _main (v_TL I) | ||
{ | ||
v2p O; | ||
O.HPos = float4 (I.P.x * screen_res.z * 2 - 1, (I.P.y * screen_res.w * 2 - 1)* -1, 0, 1); | ||
O.Tex0 = I.Tex0; | ||
|
||
return O; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "stdafx.h" | ||
#pragma hdrstop | ||
|
||
#include "blender_fxaa.h" | ||
|
||
CBlender_FXAA::CBlender_FXAA() { description.CLS = 0; } | ||
CBlender_FXAA::~CBlender_FXAA() { } | ||
|
||
void CBlender_FXAA::Compile(CBlender_Compile& C) | ||
{ | ||
IBlender::Compile(C); | ||
|
||
switch (C.iElement) | ||
{ | ||
case 0: | ||
C.r_Pass("fxaa_main", "fxaa_main", false, FALSE, FALSE); | ||
C.r_Sampler_rtf("s_base0", r2_RT_generic0); | ||
C.r_End(); | ||
break; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
class CBlender_FXAA : public IBlender | ||
{ | ||
public: | ||
LPCSTR getComment() override { return "FXAA"; } | ||
BOOL canBeDetailed() override { return FALSE; } | ||
BOOL canBeLMAPped() override { return FALSE; } | ||
|
||
void Compile(CBlender_Compile& C) override; | ||
|
||
CBlender_FXAA(); | ||
virtual ~CBlender_FXAA(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters