private void DrawMaterialMenu(MaterialPropsAndBuffer brick) { MaterialProperties props = brick.Properties.Data; float intensity = props.SpecularIntensity.X; if (ImGui.SliderFloat("Intensity", ref intensity, 0f, 10f, intensity.ToString(), 1f) | ImGui.SliderFloat("Power", ref props.SpecularPower, 0f, 1000f, props.SpecularPower.ToString(), 1f)) { props.SpecularIntensity = new Vector3(intensity); brick.Properties.Data = props; } }
private void DrawIndexedMaterialMenu(MaterialPropsAndBuffer propsAndBuffer) { MaterialProperties props = propsAndBuffer.Properties; float intensity = props.SpecularIntensity.X; float reflectivity = props.Reflectivity; if (ImGui.SliderFloat("Intensity", ref intensity, 0f, 10f, intensity.ToString(), 1f) | ImGui.SliderFloat("Power", ref props.SpecularPower, 0f, 1000f, props.SpecularPower.ToString(), 1f) | ImGui.SliderFloat("Reflectivity", ref props.Reflectivity, 0f, 1f, props.Reflectivity.ToString(), 1f)) { props.SpecularIntensity = new Vector3(intensity); propsAndBuffer.Properties = props; } }