Skip to content

02 Combined Image Sampler slang shader code typo #181

@JustinBraben

Description

@JustinBraben

In the 06 Texture Mapping/02 Combined image sampler chapter it states to try manipulating the fragment shader like so:

[shader("fragment")]
float4 fragMain(VSOutput vertIn) : SV_TARGET {
   return vec4(vertIn.fragColor * texture.Sample(vertIn.fragTexCoord).rgb, 1.0);
}

But I believe it should return float4(

[shader("fragment")]
float4 fragMain(VSOutput vertIn) : SV_TARGET {
   return float4(vertIn.fragColor * texture.Sample(vertIn.fragTexCoord).rgb, 1.0);
}

I can make a PR for it if you wish.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions