Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 910 vs 911 for /trunk/Source Code/Rendering/EnvironmentProbe.cpp

Diff revisions: vs.
  @@ -77,12 +77,18 @@
77 77
78 78 depthDescriptor.setSampler(reflectionSampler);
79 79
80 - RenderTargetHandle tempHandle;
81 - s_reflection = context.allocateRT(RenderTargetUsage::ENVIRONMENT, vec2<U16>(Config::REFLECTION_TARGET_RESOLUTION_ENVIRONMENT_PROBE), "EnviromentProbe");
82 - s_reflection._rt->addAttachment(environmentDescriptor, RTAttachment::Type::Colour, 0);
83 - s_reflection._rt->addAttachment(depthDescriptor, RTAttachment::Type::Depth, 0);
84 - s_reflection._rt->create();
85 - s_reflection._rt->setClearColour(RTAttachment::Type::COUNT, 0, DefaultColours::WHITE());
80 + vectorImpl<RTAttachmentDescriptor> att = {
81 + { environmentDescriptor, RTAttachment::Type::Colour, 0, DefaultColours::WHITE() },
82 + { depthDescriptor, RTAttachment::Type::Depth },
83 + };
84 +
85 + RenderTargetDescriptor desc = {};
86 + desc._name = "EnvironmentProbe";
87 + desc._resolution = vec2<U16>(Config::REFLECTION_TARGET_RESOLUTION_ENVIRONMENT_PROBE);
88 + desc._attachmentCount = to_U32(att.size());
89 + desc._attachments = att.data();
90 +
91 + s_reflection = context.allocateRT(RenderTargetUsage::ENVIRONMENT, desc);
86 92 }
87 93
88 94 void EnvironmentProbe::onShutdown(GFXDevice& context)