Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HelloConstBuffer ported form C++ DirectX-Graphics-Samples #65

Merged
merged 23 commits into from
May 24, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c8fef9b
Added HelloConstBuffer form C++
IngmarBitter May 19, 2020
717bcda
Descriptor heap setting fixed.
IngmarBitter May 19, 2020
982ead5
fixed HelloConstBuffer12 instantiation
IngmarBitter May 19, 2020
4699625
Apply suggestions from code review
IngmarBitter May 19, 2020
d929a64
fixes after accepting all PR feedback. Compiler happy again. Run-time…
IngmarBitter May 19, 2020
7616b6d
Apply suggestions from code review
IngmarBitter May 19, 2020
06b90ba
HelloConstBuffer12.cs resolved all IntelliSense warnigs on coding style
IngmarBitter May 19, 2020
bc35da9
_contstantBuffer disposed, _pCbvDataBegin not readonly
IngmarBitter May 19, 2020
ad22627
Merge branch 'master' into HelloConstBuffers
IngmarBitter May 19, 2020
f88c34f
Added HelloConstBuffer form C++
IngmarBitter May 19, 2020
5314901
Descriptor heap setting fixed.
IngmarBitter May 19, 2020
4090435
fixed HelloConstBuffer12 instantiation
IngmarBitter May 19, 2020
a7a7763
Apply suggestions from code review
IngmarBitter May 19, 2020
00f6175
fixes after accepting all PR feedback. Compiler happy again. Run-time…
IngmarBitter May 19, 2020
c74c1de
Apply suggestions from code review
IngmarBitter May 19, 2020
7164d18
HelloConstBuffer12.cs resolved all IntelliSense warnigs on coding style
IngmarBitter May 19, 2020
332b666
_contstantBuffer disposed, _pCbvDataBegin not readonly
IngmarBitter May 19, 2020
1af72b8
Merge remote-tracking branch 'origin/HelloConstBuffers' into HelloCon…
IngmarBitter May 23, 2020
071ebac
Merge branch 'master' into HelloConstBuffers
IngmarBitter May 23, 2020
2a30572
fixes after merge of upstream master
IngmarBitter May 23, 2020
b88a1b1
Merge branch 'master' into HelloConstBuffers
IngmarBitter May 24, 2020
e39f5ac
Merge branch 'master' into HelloConstBuffers
IngmarBitter May 24, 2020
251df5a
null in Dispose instead of #pragma to avoid intellisense warning
IngmarBitter May 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions samples/DirectX/D3D12/Assets/Shaders/HelloConstBuffer.hlsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from HelloConstBuffer\shaders.hlsl in https://github.com/Microsoft/DirectX-Graphics-Samples
// Original source is Copyright © Microsoft. All rights reserved. Licensed under the MIT License (MIT).

cbuffer SceneConstantBuffer : register(b0)
{
float4 offset;
};

struct PSInput
{
float4 position : SV_POSITION;
float4 color : COLOR;
};

PSInput VSMain(float4 position : POSITION, float4 color : COLOR)
{
PSInput result;

result.position = position + offset;
result.color = color;

return result;
}

float4 PSMain(PSInput input) : SV_TARGET
{
return input.color;
}
Loading