| 118 | } |
| 119 | |
| 120 | void OverlayEffect::SetTexture(std::shared_ptr<Texture2> const& texture) |
| 121 | { |
| 122 | if (texture) |
| 123 | { |
| 124 | auto const& pshader = mEffect->GetPixelShader(); |
| 125 | auto sampler = pshader->Get<SamplerState>("imageSampler"); |
| 126 | pshader->Set("imageTexture", texture, "imageSampler", sampler); |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | void OverlayEffect::SetTexture(std::string const& textureName, |
| 131 | std::shared_ptr<Texture2> const& texture) |