# How to get high quality resolution with basic texture loaded from svg?

**URL:** <https://forum.babylonjs.com/t/how-to-get-high-quality-resolution-with-basic-texture-loaded-from-svg/22930>\
**Category:** Questions\
**Tags:** material\
**Created:** [August 9, 2021, 2:57pm UTC](https://forum.babylonjs.com/t/how-to-get-high-quality-resolution-with-basic-texture-loaded-from-svg/22930 "2021-08-09T14:57:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jean-Marie\_Laborde](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jean-marie_laborde/32/1813_2.png) [@Jean-Marie\_Laborde](https://forum.babylonjs.com/u/Jean-Marie_Laborde)\
**Post date:** [August 9, 2021, 2:57pm UTC](https://forum.babylonjs.com/t/how-to-get-high-quality-resolution-with-basic-texture-loaded-from-svg/22930/1 "2021-08-09T14:57:06Z")

</div>

I am displaying as a texture an svg image using (as many to commonly) a line like  
_myMaterial.diffuseTexture = new BABYLON.Texture(“mySVG.svg”, scene)_  
It works but unfortunately the result is not really sharp, as the texture would be made off a 256x256 low res bitmap.  
Is there a way to control the internal resolution of the texture and how?  
What difference in performance would one have in resorting to a dynamicTexture and then drawing in the associated canvas ?  
Many thanks! jm

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [August 9, 2021, 4:41pm UTC](https://forum.babylonjs.com/t/how-to-get-high-quality-resolution-with-basic-texture-loaded-from-svg/22930/2 "2021-08-09T16:41:06Z")

</div>

To control the resolution the best would be to try to set the svg viewbox first (this could work but not tested :))

---

<div class="post-metadata">

**Author:** ![Jean-Marie\_Laborde](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jean-marie_laborde/32/1813_2.png) [@Jean-Marie\_Laborde](https://forum.babylonjs.com/u/Jean-Marie_Laborde)\
**Post date:** [August 9, 2021, 6:18pm UTC](https://forum.babylonjs.com/t/how-to-get-high-quality-resolution-with-basic-texture-loaded-from-svg/22930/3 "2021-08-09T18:18:41Z")

</div>

Adapting the Viewport OR preferably the Viewbox both works, even if some fine-tuning is probably needed.  
**Thanks again dear Deltakosh** , bsegda gotov!!  
If you’d like I could prepare a note to be possibly inserted in the doc. Et merci!

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [August 9, 2021, 6:30pm UTC](https://forum.babylonjs.com/t/how-to-get-high-quality-resolution-with-basic-texture-loaded-from-svg/22930/4 "2021-08-09T18:30:54Z")

</div>

Updating the doc would be lovely!
