You can fix this without factory resetting or flashing stock rom. Just follow this steps:
(1) Follow this tutorial:
http://www.youtube.com/watch?v=MVXX-YdhRU0
It's a guide on how to install android sdk which will b used to uninstall chainfire 3D drivers.
(2) Start your phone into recovery mode (home+volup+press+power)
(3) Navigate to "Mounts & storages" and mount /system
(3) Plug in your phone via USB cord to your computer with recovery mode on.
(4) Once you have adb opened in command prompt, type adb shell.
It will display a "#" (without quotes)
(5) Type "sh /system/lib/cf3d_uninstall.sh" (without quotes)
(6) You will c d magic
Hit the thanks button if this helped..