元の映像と描画結果を合成するシェーダーを追加する
このコミットが含まれているのは:
4ファイル変更
+45
検索条件に一致するファイルはありません
@@ -143,6 +143,14 @@
|
||||
<ShaderModel>4.1</ShaderModel>
|
||||
</FxCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<FxCompile Include="Inflate.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType>
|
||||
</FxCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -14,4 +14,9 @@
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<FxCompile Include="Inflate.hlsl">
|
||||
<Filter>ソース ファイル</Filter>
|
||||
</FxCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,28 @@
|
||||
Texture2D SourceTexture : register(t0);
|
||||
SamplerState SourceSampler : register(s0);
|
||||
Texture2D InflatedTexture : register(t1);
|
||||
SamplerState InflatedSampler : register(s1);
|
||||
|
||||
cbuffer Constants : register(b0)
|
||||
{
|
||||
float amount : packoffset(c0.x);
|
||||
float pad0 : packoffset(c0.y);
|
||||
float pad1 : packoffset(c0.z);
|
||||
float pad2 : packoffset(c0.w);
|
||||
};
|
||||
|
||||
float4 main(
|
||||
float4 position : SV_POSITION,
|
||||
float4 scenePosition : SCENE_POSITION,
|
||||
float4 uv0 : TEXCOORD0,
|
||||
float4 uv1 : TEXCOORD1
|
||||
) : SV_TARGET
|
||||
{
|
||||
float4 source = SourceTexture.SampleLevel(SourceSampler, uv0.xy, 0);
|
||||
if (amount <= 0.0)
|
||||
return source;
|
||||
|
||||
float4 inflated = InflatedTexture.SampleLevel(InflatedSampler, uv1.xy, 0);
|
||||
inflated.rgb = min(inflated.rgb, inflated.a.xxx);
|
||||
return lerp(source, inflated, amount);
|
||||
}
|
||||
@@ -62,6 +62,10 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="$(ShaderDirPath)Inflate.cso" Link="Resources\Shader\Inflate.cso" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\YMM4-GitHubUpdateNotifier\GitHubUpdateNotifier\*.cs" LinkBase="GitHubUpdateNotifier" />
|
||||
</ItemGroup>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする